Skip to content

Commit

Permalink
red: save x pos while trim spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
hugeping committed Oct 29, 2023
1 parent fc23615 commit 2ed4857
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions data/apps/red.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ function win:save()
self.buf:set(self.buf:gettext():gsub('[ \t]+\n', '\n'):gsub("[ \t\n]+$", "\n"))
if self.buf:line_nr() ~= nr then
self:toline(nr, false)
self:tox(self.cx or self.autox)
end
end
local r, e = self.buf:save()
Expand Down

0 comments on commit 2ed4857

Please sign in to comment.