mawww / kakoune

mawww's experiment for a better code editor
http://kakoune.org
The Unlicense
10k stars 715 forks source link

Enabling mouse support, setting high `scrolloff` values and clicking off a line moves the cursor to a different line, causing lines to be selected. #4030

Open nothingnesses opened 3 years ago

nothingnesses commented 3 years ago

Steps

Outcome

The cursor has jumped to a different line, selecting a bunch of lines in the interim of clicking on and off (when clicking on the middle line, clicking off works as expected and it stays on the same line).

Expected

The cursor stays on the same line.

samwega commented 3 years ago

Been looking for a solution to this as well. In the meantime I keep scrolloff to a smaller value (~3) so that I can still click most of the screen.

skarekrow commented 1 month ago

Has anybody figured out a way to map the mouse left to select and then disabling the selection? Any incarnation I try doesn't seem to work, it doesn't seem possible to map to mouse keys at all?

Ideally something like this would work (I have escape mapped to remove all selections):

map global normal <esc> ';,'                               -docstring 'remove selections except main'
map global normal <mouse:left> '<mouse:left><esc>' -docstring 'Only leave a single character selected with mouse click'