Live data from Hacker News

Bug in Notepad Involving Asterisk in Title Bar

suszter.com

11–20 of 132 posts

Re: Bug in Notepad Involving Asterisk in Title Bar

#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.

Re: Bug in Notepad Involving Asterisk in Title Bar

#13
post #9

Earlier quoted context omitted.

Pressing the arrow keys on their own does nothing, but pressing DEL (no title update) then an arrow key does.

Huh (confirmed), trying to imagine that code path. Edit: Played around a bit, it's odd. For example then click on a different window (release focus) does trigger the update.

  if(key !== KEY_DELETE) {
    testForChanges();
  }

Re: Bug in Notepad Involving Asterisk in Title Bar

#14
post #9

Earlier quoted context omitted.

Pressing the arrow keys on their own does nothing, but pressing DEL (no title update) then an arrow key does.

Huh (confirmed), trying to imagine that code path. Edit: Played around a bit, it's odd. For example then click on a different window (release focus) does trigger the update.

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

Re: Bug in Notepad Involving Asterisk in Title Bar

#16
post #9

Earlier quoted context omitted.

Pressing the arrow keys on their own does nothing, but pressing DEL (no title update) then an arrow key does.

Huh (confirmed), trying to imagine that code path. Edit: Played around a bit, it's odd. For example then click on a different window (release focus) does trigger the update.

I think the point is that the arrow keys update the status, if a change has indeed occurred, and delete key does not update status but does change the text.

Re: Bug in Notepad Involving Asterisk in Title Bar

#17
post #8

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

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

The parent comment meant it as sarcasm.

Re: Bug in Notepad Involving Asterisk in Title Bar

#18
post #8

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

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

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.

Re: Bug in Notepad Involving Asterisk in Title Bar

#19
post #5

I can reproduce this behavior. Though I noticed that removing a newline with does cause the asterisk to appear.

I can reproduce with an added twist: deleting a character using Del does not cause the asterisk to appear. However, if I move my mouse over the Notepad window after deleting a character using Del, then the asterisk appears. Mouseover appears to cause an update.
Post reply on HN