mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 23:08:16 +00:00
vim-patch:9.0.0901: setting w_leftcol and handling side effects is confusing
Problem: Setting w_leftcol and handling side effects is confusing.
Solution: Use a function to set w_leftcol() and handle side effects.
0c34d56264
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -1648,8 +1648,6 @@ bool mouse_scroll_horiz(int dir)
|
||||
return false;
|
||||
}
|
||||
|
||||
curwin->w_leftcol = (colnr_T)leftcol;
|
||||
|
||||
// When the line of the cursor is too short, move the cursor to the
|
||||
// longest visible line.
|
||||
if (!virtual_active()
|
||||
@@ -1658,7 +1656,7 @@ bool mouse_scroll_horiz(int dir)
|
||||
curwin->w_cursor.col = 0;
|
||||
}
|
||||
|
||||
return leftcol_changed();
|
||||
return set_leftcol(leftcol);
|
||||
}
|
||||
|
||||
/// Adjusts the clicked column position when 'conceallevel' > 0
|
||||
|
Reference in New Issue
Block a user