dpradov / keynote-nf

Tabbed notebook with RichText editor, multi-level notes and strong encryption.
Mozilla Public License 2.0
252 stars 56 forks source link

save and restore caret position...not sure what it's supposed to do #720

Open fitness888 opened 3 months ago

fitness888 commented 3 months ago

As an example; if my cursor is positioned in the text editor on the 12th row/9th column and I then scroll down with my mouse to the 23rd row/4th column and I then click outside the program window to my browser window to read something and then click back anywhere on the text editor, the page automatically jumps from the the 23rd row/4th column back to the 12th row/9th column. I've unchecked 'save and restore caret position' but it doesn't help prevent this unwanted behaviour.

dpradov commented 3 months ago

When you check the "Save and restore caret position" option, what you indicate is that you want the application to save in the KNT document, when saving, the position of each note, so that when you open the document you can recover it. It has nothing to do with what you point out. Regarding what you indicate, when you say: "I then scroll down with my mouse to the 23rd row/4th column", how do you do it? How do you get to see exactly that the cursor is in that row and column? Do you see it in the status bar? Because when you scroll with the mouse using the central wheel, what you do is move the scroll bar, but not the position of the caret, which remains in its position (the same as what happens if you use Ctrl+Up/Down and have any of the two options that I highlight here )

imagen

If what you do with the mouse is move to that position and click on it, then you should see it reflected in the status bar and it should be remembered. Then, regardless of what you did to see a more advanced position, if after selecting the other application you go back to KeyNote and click inside the text editor it should place the cursor there.

What version of KeyNote NF are you using? Do you have a dynamic tree panel width configured that might be confusing you?

fitness888 commented 3 months ago

https://github.com/dpradov/keynote-nf/issues/720#issuecomment-2229069558 Thanks for the follow-up...I will need a bit of time to address your questions.

fitness888 commented 3 months ago

Regarding what you indicate, when you say: "I then scroll down with my mouse to the 23rd row/4th column", how do you do it? I do it by using the middle wheel on my mouse to scroll down to where I want the note to be and then click on that position in the note.

Do you see it in the status bar? Yes

Because when you scroll with the mouse using the central wheel, what you do is move the scroll bar, but not the position of the caret, which remains in its position (the same as what happens if you use Ctrl+Up/Down and have any of the two options that I highlight here ) Yes this I understand...I click the mouse to re-locate the cursor in the new position

If what you do with the mouse is move to that position and click on it, then you should see it reflected in the status bar and it should be remembered. Then, regardless of what you did to see a more advanced position, if after selecting the other application you go back to KeyNote and click inside the text editor it should place the cursor there. Yes I understand this...however the unwanted behaviour I describe does not occur all the time so I will try and get the instructions for what I do exactly that reproduces it as I thought this was a possible option setting.

What version of KeyNote NF are you using? v.1.9.5 .2 Do you have a dynamic tree panel width configured that might be confusing you? No I do not

dpradov commented 3 months ago

the unwanted behaviour I describe does not occur all the time so I will try and get the instructions for what I do exactly that reproduces it as I thought this was a possible option setting

Ok, thanks

fitness888 commented 3 months ago

the unwanted behaviour I describe does not occur all the time so I will try and get the instructions for what I do exactly that reproduces it as I thought this was a possible option setting

Ok, thanks

dpradov are you aware of this malfunction regarding line/column count, not enough room for the column?

Screenshot 2024-07-18 194841
dpradov commented 3 months ago

dpradov are you aware of this malfunction regarding line/column count, not enough room for the column?

I've never had that problem.

imagen

Can you tell me what scaling, font, or similar settings you have set in Windows? For example, currently in my system (W11):

imagen

fitness888 commented 3 months ago

dpradov are you aware of this malfunction regarding line/column count, not enough room for the column?

I've never had that problem.

imagen

Can you tell me what scaling, font, or similar settings you have set in Windows? For example, currently in my system (W11):

imagen

same as you image

100% scale bahnschrift font

fitness888 commented 3 months ago

https://github.com/dpradov/keynote-nf/issues/720#issuecomment-2239921337 dpradov I needed to go into safe mode for something and noticed that the issue I mentioned was instead ok in safe mode...please disregard my comment regarding it as an issue. I will report back to you when I find exactly what caused it.

Screenshot 2024-07-18 194841
fitness888 commented 3 months ago

https://github.com/dpradov/keynote-nf/issues/720#issuecomment-2241394477 dpradov it seems that it is the statusbar font size selection that is the issue, if too big you get the last number cutoff. It's ok as you can now see.
image

dpradov commented 3 weeks ago

I have seen a strange behavior of the RichEdit control when the application is restored through a Hotkey of the form CTRL+SHIFT+... The editor ended up receiving an EN_CHANGE message and the Change method of the control was called. "Modified" property of the editor was changed to True (^), and the position of the scrollbar was lost, thus displaying the cursor position.

With another type of Hotkey combination it didn't happen (e.g. ALT+F7)

From what I see, at least in W10, the scrollbar position problem is linked to the fact that the editor catch the hotkey and treats as a modification (^). In fact, if the file had not been modified yet I can see how it changes to display "MOD" (in addition to not respecting the scrollbar position). I also see that the mere fact of pressing CTRL+SHIFT (without any additional key) when the editor has the focus causes the same effect (^). I have been able to easily solve the latter from App.FormShortCut. The solution to the Hotkey was much more difficult to find.

(^) At least it appears as modified when I run it from the virtual machine in W10. In Windows 11 the scrollbar position is altered but it is not being marked as modified. I don't know the reason of that differences.

fitness888 commented 3 weeks ago

dpradov are you saying that I can return the statusbar font size selection to a larger font size without the issue of the last number cutoff. I use Winaero Tweaker.

dpradov commented 3 weeks ago

Sorry, but I was not referring to the status bar font size issue, but on the main issue (and more important) you reported here.

fitness888 commented 3 weeks ago

Sorry, but I was not referring to the status bar font size issue, but on the main issue (and more important) you reported here.

Thanks dpradov, yes now your post makes sense to me and I'm glad that you have been able to confirm the issue I mentioned in my original post here. I don't use any key combos, as mentioned I click out of the KN note window to another program and then when I click back into the KN note I sometimes have the scroll bar move.

dpradov commented 2 weeks ago

For now, what you say about losing the scrollbar position when you return to KeyNote by clicking on the application and not using the Hotkey combination is something I can't reproduce. If it's ever happened to me, I don't remember. I'll be on the lookout, of course, if it happens to me. Also, if you identify any possible pattern when it happens to you again, please let me know.

fitness888 commented 2 weeks ago

For now, what you say about losing the scrollbar position when you return to KeyNote by clicking on the application and not using the Hotkey combination is something I can't reproduce. If it's ever happened to me, I don't remember. I'll be on the lookout, of course, if it happens to me. Also, if you identify any possible pattern when it happens to you again, please let me know.

Will do...