lite icon indicating copy to clipboard operation
lite copied to clipboard

Hard to select a line when it doesn't fit the windows

Open terencode opened this issue 5 years ago • 4 comments

Selecting a long line has an usual mechanic where it doesn't wait for the selection to reach the very right of the document before scrolling vertically but instead scrolls right away It's particularly hard to select a line from right to left with this behaviour.

Peek 2020-12-11 15-19 (1)

terencode avatar Dec 11 '20 14:12 terencode

I was bothered by this problem since I began using Lite but I put this aside in a corner of my mind. Still the problem was popping out whenever I was selecting some text with the mouse across a long line.

Now that I have seen your bug report I got the point to fix it and I think I found the right solution. With the fix Lite just behaves like the other editors and text selection problem just disappears.

The fix is now included in Lite XL and will be included in the release 1.14 I am preparing right now. The code is already there but I need to prepare the binary packages.

Here the pull request for rxi/lite:

https://github.com/rxi/lite/pull/230

I hope it will be accepted, I really love the Lite editor.

franko avatar Dec 13 '20 12:12 franko

Thanks really appreciate your work franko :) I still see the behaviour on 14.1 Peek 2020-12-14 17-42

I'm wondering If I should move this issue to your project though..

Looks like a packaging problem from my side... will try to figure this out.

terencode avatar Dec 14 '20 16:12 terencode

Are you sure you are using the 1.14 package ? On which OS you are ?

You can do also a more simple test to check:

  • open a file and move into a long line, one that doesn't fit in the screen
  • more the cursor in the right direction using the keyboard. You should observe that it begins scrolling when you are 2 or 3 character close to the edge.
  • move now on the left with the keyboard. You should not observe no scrolling.

if you observe the behavior above you should be using version 1.14. The other Lite versions scrolls again when you move on the left.

You can also check you have 1.14 if with ctrl+shift+p you find the command "core:restart".

franko avatar Dec 14 '20 18:12 franko

It was indeed a packaging issue: I followed the arch-wiki meson package guidelines that put the build directory at the root of the pkgdir but because of this even if there is a new source after a version bump it will still use the old one (or I need to do a cleanbuild).

The solution I came up with was to add --reconfigure to meson so that the build directory gets regenerated each time.

For reference: https://aur.archlinux.org/packages/lite-xl

EDIT: It seems like not using cd $pkgdir before running meson is an oversight from the wiki...

terencode avatar Dec 15 '20 01:12 terencode