mirror of
https://github.com/zyedidia/micro
synced 2024-10-01 21:54:27 +00:00
hltrailingws: improve behavior with selection
Improve user experience: if we are at a line with a new (i.e. not highlighted yet) trailingws and we begin selecting text, don't highlight the trailingws until we are done with selection, even if we moved the cursor to another line while selecting.
This commit is contained in:
parent
f108c90643
commit
53efce72fa
|
@ -512,7 +512,8 @@ func (h *BufPane) HandleEvent(event tcell.Event) {
|
|||
|
||||
cursors := h.Buf.GetCursors()
|
||||
for _, c := range cursors {
|
||||
if c.NewTrailingWsY != c.Y {
|
||||
if c.NewTrailingWsY != c.Y && (!c.HasSelection() ||
|
||||
(c.NewTrailingWsY != c.CurSelection[0].Y && c.NewTrailingWsY != c.CurSelection[1].Y)) {
|
||||
c.NewTrailingWsY = -1
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue