Mercurial > vim
diff src/optionstr.c @ 34369:92452a65138e v9.1.0114
patch 9.1.0114: Setting some options may change curswant
Commit: https://github.com/vim/vim/commit/fcaed6a70faf73bff3e5405ada556d726024f866
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sun Feb 18 09:33:54 2024 +0100
patch 9.1.0114: Setting some options may change curswant
Problem: Setting some options changes curswant unnecessarily.
Solution: Add a P_HLONLY flag that prevents changing curswant.
(zeertzjq)
closes: #14044
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 18 Feb 2024 09:45:06 +0100 |
parents | a7354a835a78 |
children | c5a945f7f3da |
line wrap: on
line diff
--- a/src/optionstr.c +++ b/src/optionstr.c @@ -4510,7 +4510,8 @@ did_set_string_option( #endif if (curwin->w_curswant != MAXCOL - && (get_option_flags(opt_idx) & (P_CURSWANT | P_RALL)) != 0) + && (get_option_flags(opt_idx) & (P_CURSWANT | P_RALL)) != 0 + && (get_option_flags(opt_idx) & P_HLONLY) == 0) curwin->w_set_curswant = TRUE; if ((opt_flags & OPT_NO_REDRAW) == 0)