mirror of
https://github.com/neovim/neovim.git
synced 2026-08-15 03:49:28 +00:00
Problem: the ruler is not cleared in the following circumstances: - ui1 is running - 'rulerformat' is configured - the default ruler was not previously visible in the last line, for example because 'rulerformat' is configured in init.lua - 'ruler' is disabled without using the command-line, for example via key-binding (entering the command-line would clear the ruler) The corresponding test case did not fail because 'rulerformat' was set while the default ruler was shown. Solution: use a dedicated variable for tracking whether the ui1 ruler was previously shown in the last line. `did_ruler_col` is now only used for setting `msg_col`, which is not implemented in the case where 'rulerformat' is configured. Reorder the test code to make the individual checks more independent from each other, and to reflect the future where 'rulerformat' will never be empty. Note that the check where 'rulerformat' was configured relied on the default ruler not being cleared and a stale "0," still being shown in front of the new ruler - this is also fixed with ui2.