]> git.lizzy.rs Git - micro.git/commit
Fix softwrap scrolling issues (#1981)
authorDmitry Maluka <dmitrymaluka@gmail.com>
Wed, 7 Apr 2021 20:18:51 +0000 (22:18 +0200)
committerGitHub <noreply@github.com>
Wed, 7 Apr 2021 20:18:51 +0000 (16:18 -0400)
commitc5798b5b8cef385f9f34f256239c855e3db94253
tree067d0ffca109ffec75a8a5f1ec4b5a135b5d40b5
parent6f949fe9853899caffb2629c98b280463e54687b
Fix softwrap scrolling issues (#1981)

Softwrap implementation enhanced to fix various issues with scrolling,
centering, relocating etc.

The main idea is simple: work not with simple line numbers but
with (Line, Row) pairs, where Line is a line number in the buffer
and Row is a visual line (a row) number within this line.
The logic remains mostly the same, but simple arithmetic operations
on line numbers are replaced with corresponding operations on
(Line, Row) pairs.

Fixes #632, #1657
cmd/micro/initlua.go
internal/action/actions.go
internal/action/globals.go
internal/display/bufwindow.go
internal/display/infowindow.go
internal/display/softwrap.go [new file with mode: 0644]
internal/display/window.go
runtime/help/plugins.md