Skip to content

Commit

Permalink
red: jump on line selects pre line
Browse files Browse the repository at this point in the history
  • Loading branch information
hugeping committed Oct 26, 2024
1 parent 32c4163 commit efca656
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/lib/red/win.lua
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,9 @@ function win:toline(nr, sel)

local start = self.buf.cur
if type(sel) == 'number' and sel ~= 0 then
self.buf:linestart()
start = self.buf:linestart()
self:cur(self:cur()+sel)
self.buf:setsel(start, self.buf.cur)
elseif sel ~= false then
self.buf:lineend()
self.buf:setsel(start, self.buf.cur)
Expand Down

0 comments on commit efca656

Please sign in to comment.