Live data from Hacker News

Bug in Notepad Involving Asterisk in Title Bar

suszter.com

101–110 of 132 posts

Re: Bug in Notepad Involving Asterisk in Title Bar

#101

There's another bug... open a file, make a single change (asterisk appears), press Ctrl-Z to undo, asterisk does not disappear.

Don't most text editors do that though?

That depends a lot; vi/vim and emacs keep track of your undos in a way so they know when you are back on the last saved version. But indeed, most other editors don't.

Re: Bug in Notepad Involving Asterisk in Title Bar

#102
post #98

Earlier quoted context omitted.

Emacs gets it right; the asterisk disappears even if you execute many actions and then multi-undo back to the starting state.

Yeah, but Emacs isn't what you call "most text editors"

It's more of an operating system, which, by the way, could use a good editor.

Re: Bug in Notepad Involving Asterisk in Title Bar

#103
I just found another bug while testing this bug:

1. Open Notepad

2. Type then backspace. (asterisk shows in title bar - arguably a bug here, but ignoring that ...)

3. Open a new text file. Asterisk showing in the title bar (Expected: no asterisk) - Unless you move the mouse over the window (then the asterisk disappears).

Windows 10 Enterprise v1909

Re: Bug in Notepad Involving Asterisk in Title Bar

#104

There's another bug... open a file, make a single change (asterisk appears), press Ctrl-Z to undo, asterisk does not disappear.

Don't most text editors do that though?

VS Code will remove the unsaved mark if you undo the edit with the undo command (ctrl-z), but not if you for instance backspace to undo the character you entered manually.

Re: Bug in Notepad Involving Asterisk in Title Bar

#105
post #101

Earlier quoted context omitted.

Don't most text editors do that though?

That depends a lot; vi/vim and emacs keep track of your undos in a way so they know when you are back on the last saved version. But indeed, most other editors don't.

Sublime, Atom, VS Code, Notepad++

Re: Bug in Notepad Involving Asterisk in Title Bar

#106
post #28

Earlier quoted context omitted.

Probably because few of the people who are aware of what an asterix in the title bar mean (mostly devs) are still using notepad.

I mean... I use notepad. I frequently use it to clear the non-text formats from the clipboard so when I paste I actually get text. Some apps don't let you pick the paste format and try to be helpful with formatting. Most of the time I don't want that. Win+R is useful for small snippets, but notepad is useful for multiline text. But I don't pay attention to the asterisk, because I just use it as a scratchpad. When I n…

The URL bar is useful for that too (before pasting into a webpage text box) :)

Re: Bug in Notepad Involving Asterisk in Title Bar

#107
Since many are indicating that any UI event triggers the expected change to the Title bar, it seems to be an issue in the event handling loop in Notepad? For some reason it is "stuck" or otherwise sleeping and not picking up the changes from `notepad!UpdateTitle` unless the UI event loop gets kicked?

Re: Bug in Notepad Involving Asterisk in Title Bar

#108
post #77

Earlier quoted context omitted.

Just looking at the messages received, it looks like they're triggering off a few different things to fall into the code path that looks for changes (the missing numbers are due to me deleting uninteresting messages): 002A1272 P WM_KEYDOWN nVirtKey:VK_DELETE cRepeat:1 ScanCode:53 fExtended:1 fAltDown:0 fRepeat:0 fUp:0 002A1272 S EM_POSFROMCHAR wCharIndex:0 004E0A18 S WM_COMMAND wNotifyCode:EN_CHANGE wID:15 hwndCtl:00…

Ah, yes...that's what I was getting at. Notepad is mostly a wrapper around a rich edit control, and rich edit controls already emit "EN_CHANGE" when the content changes. So I suppose this must be some historical thing where an earlier version of notepad didn't have something like that to tee into.

Notepad is a wrapper around a plain text control.

WordPad is a wrapper around a rich text control.

Re: Bug in Notepad Involving Asterisk in Title Bar

#109

Earlier quoted context omitted.

Ah yes, trade a small, easily fixed, bug for a life-time of JS induced jank. No thank you.

I mean, React Native is not a bad choice for a "new notepad", similar to how they did with the calculator. It can even get the "Microsoft OpenSource Project" seal. See ReactXP[1] a library for React Native from Microsoft Speaking about the calculator app, did you know it is OpenSource[2]? You can only compile to windows as of now though [1]: https://github.com/Microsoft/reactxp [2]: https://github.com/microsoft/calcu…

The new calculator is written with UWP and C++, right? I'm failing to see the similarity.

Re: Bug in Notepad Involving Asterisk in Title Bar

#110
Consider submitting bug reports or feature requests for Notepad to Microsoft with Windows' built-in Feedback Hub. For bugs, your reported reproduction steps and the diagnostic logs collected by Feedback Hub are often actionable without you having to debug Notepad yourself (as this person had to do).

You can increase the visibility of a Feedback Hub item by sharing a link to it on your blog, on Twitter, or wherever.

Post reply on HN