Live data from Hacker News

Bug in Notepad Involving Asterisk in Title Bar

suszter.com

81–90 of 132 posts

Re: Bug in Notepad Involving Asterisk in Title Bar

#81
post #26

Earlier quoted context omitted.

It checks for updates when you press the arrow keys, but not delete?

Right. Trying to understand why you would check for an update for a key that doesn't change data and not check for one that does. It also checks when the window loses focus, so works.

If I absolutely had to guess, it'd be that there's an early out/special code path for the delete key where they forgot to add the "checkupdate" before the break/return/whatever ^^

Re: Bug in Notepad Involving Asterisk in Title Bar

#82
post #75
post #40

Aside from everything else, I have great respect for people who find bugs in widely used and long-established software. Even though this may not be a major bug, I admire the bugfinder just the same.

Notepad is indeed long established. But it's in active development. 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).

My understanding of notepad.exe is that it's a very-few-loc wrapper around a fundamental windows UI element. That's why it can be fun to see that there are bugs in its implementation.

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.

Re: Bug in Notepad Involving Asterisk in Title Bar

#84
post #8

This would be avoided if Notepad was implemented in React Native for Windows.

Or if they wrote to a database on change and read on every cycle. For correctness, blockchain may be suitable.

I was aghast when I read this comment until I realized it was sarcasm, and then I got a good laugh thinking about the look I still had on my face. It made me wonder... how many people in any given echo chamber are simply fanning the fire due to a misunderstanding? Probably a lot.

Re: Bug in Notepad Involving Asterisk in Title Bar

#85

not asking to get into an app namedropping war, but do alot of ppl use Notepad still? Kind of moved away from it years ago due to encoding, lack of some features etc

If I just need to take a quick note, I'll happily run Notepad, which opens instantly , write down what I needed to write down, save it, and then move on with my life. The "runs instantly" part is what still makes it useful, nothing else comes even close to just immediately giving you a textbox to spew characters into. That's all it's for though, for real work, real editors (meaning different editors for different tas…

> nothing else comes even close to just immediately giving you a textbox to spew characters into

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.

Re: Bug in Notepad Involving Asterisk in Title Bar

#86

Three cheers for a Windows bug that's not a gaping security hole!

This is a great challenge: can you piggy-back off this bug to escalate privileges?

I'm going to say “no”; the asterisk-in-title-bar feature hasn't been around long enough for any high-privilege systems to rely on it.

Re: Bug in Notepad Involving Asterisk in Title Bar

#88
post #12
post #8

This would be avoided if Notepad was implemented in React Native for Windows.

ill give the short answer to this. millions depend on notepad. a small change , can have devastating effects. What if the editor doesn't respond to the same WM_XYZMESSAGE? what if your enterprise depends on an obscure app that modifies notepad. 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.

Won't somebody please think of backcompat with the Notepad raytracer?![1]

[1] http://kylehalladay.com/blog/2020/05/20/Rendering-With-Notep...

Post reply on HN