comparePlus icon indicating copy to clipboard operation
comparePlus copied to clipboard

Navigation: make sure the beginning of line is visible

Open Yaron10 opened this issue 3 years ago • 2 comments

Hello Pavel,

Could you please compare these files?

Place the caret at line 84 in prefsNew.js and make sure the beginning of line 69 is not visible.

תמונה

Click Prev.

Result: The caret correctly jumps to line 69, but the beginning of that line is still not visible.

NOTE: if you add bookmarks to lines 84 and 69, place the caret at line 84 and use "Go to Previous Bookmark" - the beginning of line 69 is visible.

https://github.com/notepad-plus-plus/notepad-plus-plus/blob/dfa6c19d8766a8c3cf66fdb6632deddbd3b6a8e9/PowerEditor/src/Notepad_plus.cpp#L4520

Thank you.

Yaron10 avatar Sep 30 '22 10:09 Yaron10

Hello Yaron,

I'll check that, thank you.

BR

pnedev avatar Sep 30 '22 20:09 pnedev

Hello Pavel,

👍 Great. Thank you. I haven't tested it with an older commit, but I think it was introduced recently.

BR

Yaron10 avatar Sep 30 '22 21:09 Yaron10

Hello Yaron,

The behavior is changed accordingly here. Please have in mind that if you try the same STR but in the other view will lead to placing the caret at line 73 and displaying diff arrow mark towards the blank section. Thank you.

BR

pnedev avatar Oct 10 '22 13:10 pnedev

Hello Pavel,

Excellent! 👍 Thank you for yet another improvement.

BR

Yaron10 avatar Oct 10 '22 20:10 Yaron10

Hello Pavel,

Thank you for https://github.com/pnedev/comparePlus/commit/c1c61aa2d4c267a2a2cef570752a579bf1083c6c.
I haven't tested it properly, but It seems like a good idea. 👍

If you place the caret at line 74 in prefsOld.js and press Prev, you jump to line 72. If you place the caret at line 73 in prefsOld.js and press Prev, you jump to line 60.

Now that line 73 is no longer a "place holder" (or an "arrow-line") for line 72, shouldn't you jump to line 72? What's the difference now between line 74 and line 73?

Would it require a major refactoring and re-testing? If it would, I'm wondering if the previous behavior might not be better ans safer.

BR

Yaron10 avatar Oct 11 '22 15:10 Yaron10

Hello Yaron,

Thank you for catching that, good work! :+1:

This wrinkle is ironed here.

BR

pnedev avatar Oct 13 '22 07:10 pnedev

Hello Pavel,

👍 It's been smoothly and perfectly ironed. Thank you maestro. :)

BR

Yaron10 avatar Oct 13 '22 13:10 Yaron10

Hello Pavel,

Could you please compare these files? Place the caret at line 1527 in CompareOld.cpp. Prev.

Result: You do not jump to Prev.

Whenever you have time. Thank you.

BR

Yaron10 avatar Oct 15 '22 12:10 Yaron10

Hello Yaron,

Strange, it works for me. Placing the caret at line 1527 and using Prev I get to line 1515, just below the blank and I also see the arrow mark properly.

Any specific details on your side? Thank you.

BR

pnedev avatar Oct 18 '22 07:10 pnedev

Hello Pavel,

I get your result with "Ignore Spaces" checked. Could you please try it with that setting OFF?

תמונה

Thank you. BR

Yaron10 avatar Oct 18 '22 10:10 Yaron10

Hello Yaron,

Correct, now it reproduces just fine :+1: Thank you.

BR

pnedev avatar Oct 18 '22 12:10 pnedev

Hello Yaron,

The problem case should be solved here. Thank you once again for testing and reporting.

BR

pnedev avatar Oct 19 '22 07:10 pnedev

Hello Pavel,

👍 Great! Thank you for the quick fix. I appreciate it.

BR

Yaron10 avatar Oct 19 '22 13:10 Yaron10