Bug in Notepad Involving Asterisk in Title Bar
suszter.com
suszter.com
OK, that's an exaggeration, but it is occasionally developed, despite its appearance not changing much in 25 years.
My favourite features it gained were support for Unix (LF) line endings, and support for normal UTF-8 (without a BOM).
It reminds me of this joke: Every program has at least one bug and can be shortened by at least one instruction — from which, by induction, every program can be reduced to one instruction which doesn't work.
1. Open Notepad
2. Type <space> 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
You can increase the visibility of a Feedback Hub item by sharing a link to it on your blog, on Twitter, or wherever.
Edit: Played around a bit, it's odd. For example <del> then click on a different window (release focus) does trigger the update.
if(key !== KEY_DELETE) {
testForChanges();
} <00133> 002A1272 P WM_KEYDOWN nVirtKey:VK_DELETE cRepeat:1 ScanCode:53 fExtended:1 fAltDown:0 fRepeat:0 fUp:0
<00150> 002A1272 S EM_POSFROMCHAR wCharIndex:0
<00152> 004E0A18 S WM_COMMAND wNotifyCode:EN_CHANGE wID:15 hwndCtl:002A1272
<00154> 002A1272 P WM_KEYUP nVirtKey:VK_DELETE cRepeat:1 ScanCode:53 fExtended:1 fAltDown:0 fRepeat:1 fUp:1
<00155> 002A1272 P WM_KEYDOWN nVirtKey:VK_RIGHT cRepeat:1 ScanCode:4D fExtended:1 fAltDown:0 fRepeat:0 fUp:0
<00174> 002A1272 S EM_POSFROMCHAR wCharIndex:1
<00182> 002A1272 S EM_GETMODIFY
<00184> 004E0A18 S WM_SETTEXT lpsz:02EDCAF8 ("*Example.txt- Notepad")
The one that seems to get triggered the most, indeed the one triggering it here, is the code path that also updates the position indicator, hence why Del isn't doing anything. Interestingly enough, they seem to be ignoring the EN_CHANGE message, and instead looking for changes explicitly after some events. Given the long history of Notepad, I'm sure there's some historical reason for that.They do seem to be covering the bases checking for changes before anything that might lose data, like any path I can find to close the window, so it's a minor bug. They also check for changes on each and every mouse move message, so I think for most users, this state won't last long.
WordPad is a wrapper around a rich text control.
Win 10 20H2 build 19042.928.
Which actually seems all the more odd because it does get updated when you move the mouse, use the arrow keys (or other non-inserting keys like Alt+F4)
1) when resizing an image in >100% zoom from edge of the screen, it would cut more pixels than you tried to cut (although I don't repro anymore, seems fixed?)
2) sometimes when you press "shift" to draw a straight line, upon releasing shift, the line changes color (very rare repro, but happened to me many times; really curious what's the source of this one).
So almost a year.
Today I found a bug in the editor of the Commodore 64. It has been there for at least 30 years.
Wonder if it could be something split between the control that the editor is using vs their key handler. The control may be eating it before the editor code even see the key press.
That would be my 'guess'.
I just tried any edit on my copy of windows and it is not showing any asterisk for any edits. It could be a newer feature that is not done yet? As I am using an older win10 copy.
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 need to restart for updates I inevitably have several Untitled notepads open that need to be manually closed out.
Notepad is a great "scratchpad" application for clearing format/re-arranging data/fixing copy mistakes/etc. Plus leaving little short-duration notes to myself (with Sticky Notes for longer term reminders).
The fact it is a window-ed application on Windows is a major perk in 2021 when nearly no application behaves in a standard way anymore. That's why I use Notepad++ for different things than Notepad: It is more powerful, but takes longer to open, and has tabs which is a detriment for my usage of Notepad (I want fast taskbar switching) but a benefit for how I use Notepad++.
Notepad++ is great for Show Symbol -> Show All Characters, Encoding, and RegX/Extended Search&Replace in particular. Regular Notepad as a glorified clipboard helper.
https://microsoft.public.word.formatting.longdocs.narkive.co...
So no, best option create a new editor, but there are 1000 editors out there.
look at sublime text 4.. its pure opengl. fast, and epic done right.
[1] http://kylehalladay.com/blog/2020/05/20/Rendering-With-Notep...
Speaking about the calculator app, did you know it is OpenSource[2]? You can only compile to windows as of now though
Why? I suppose if your render() function had something like
showAstrix = this.state.editorBuffer != this.state.savedBuffer
then it wouldn't be subject to the bug, but the performance would be terrible if you're editing a large file. To get good performance you'd need to use a flag and update it accordingly, which will subject you to the same bug.I would drop everything and try to compromise a nested dependency
Simpler, more elegant, better integrated solution, consistent across the whole OS.
"Asterisk in the Title Bar" is a very unrefined solution to the problem.
Not saying it's better, just that your "unrefined solution" might be another man's "feature".
It shows up on the titlebar but more importantly in the window pager/taskbar, which isn't a feature on Mac OS (though to be fair it also doesn't show up on Linux/Windows desktops that are configured to show icons only in the window pager).
That's all it's for though, for real work, real editors (meaning different editors for different tasks, because writing a long text in a code editor is kind of like insisting on using a chef knife for everything in the kitchen. Possible, but a bit silly)
On my machine, when there's an Emacs daemon running in the background (so no existing windows, which might make this process faster), opening a new window ("frame" in Emacs terminology) and then closing it again takes 165 milliseconds total.
Google gives various values for "human reaction time", but one of them is 200 milliseconds.
I'd say that that's pretty close.
Unless you need to save those 12 MB of memory that the Emacs daemon consumes.
You're free to use whatever editor you want, but I find the claim that "nothing else comes even close to just immediately giving you a textbox to spew characters into" a bit doubtful.
1) to strip formatting of text
2) to validate text. For example spotting an O or 0, | or l, etc. Its quite normal when dealing with user input to find configuration errors this way
3) Quick temporary paste buffer. Nice when jotting down phonecalls. Better than onenote since it opens quickly and ready to accept input. it never opens on some random page full of categorized notes.