Skip to content

Recount

Latest

Choose a tag to compare

@myusuf3 myusuf3 released this 01 Aug 23:44
v0.7.0
9657aed

First release since 2013. Everything reported in the tracker is fixed, and the plugin now has a test suite that runs against both Vim and Neovim in CI.

Fixed

  • Numbers reappearing in terminal, help and quickfix windows (#70). Those buffers leave 'filetype' empty, so g:numbers_exclude could never reach them. They are now excluded by 'buftype'.
  • :NumbersToggle doing nothing on the first call when g:enable_numbers = 0 (#63). The toggle read a cached mode that disagreed with the actual gutter; it now reads the live option.
  • No way out of relative numbering (#64). :NumbersDisable left 'relativenumber' on, so disabling the plugin left you in relative-only numbering. It now leaves plain absolute numbers, and they survive insert mode and window switches.
  • Sidebar plugins showing numbers (#55, #48, #59). Plugin windows often set their filetype after BufNewFile has already fired, so the exclude list was checked against an empty 'filetype'. A FileType hook now re-checks it. buffergator and easybuffer were added to the defaults, and Vim no longer leaves numbers in a freshly opened :terminal.
  • Numbers flickering on i_CTRL-O (#45). Running one normal-mode command from insert mode fired InsertLeave/InsertEnter, flipping the gutter twice. The insert-pending state is now detected and left alone.
  • Cursor jumping several columns under vscode-neovim (#76). VSCode draws its own gutter, so the plugin now disables itself there. Use "editor.lineNumbers": "relative" instead.
  • Windows stuck without numbers after they stopped being excluded - a window that had shown a sidebar filetype kept 'nonumber' until it was left and re-entered.

Added

  • g:numbers_exclude_buftypes, for excluding windows by 'buftype'. Defaults to every special buffer kind; shorten it to let numbers back into, say, the quickfix window. Based on the approach from @akho in #75.
  • Absolute numbers while typing an Ex command (#62), so the line in :14y can be read straight off the gutter. Searches are deliberately left alone.
  • Documentation for g:numbers_exclude, which had never been documented, and a statement of which modes actually switch.

Not a bug

  • Lag on large files (#65) was measured rather than argued about. The plugin adds ~0.5 ms per 400 cursor motions over setting the same options by hand - noise. The cost is 'relativenumber' itself redrawing the gutter, amplified on Vim 7.4 by the old regexp engine. Numbers are in the issue.

Development

  • 24 test cases in test/cases/, run with ./test/run.sh against both editors, each in its own process. GitHub Actions runs them on every push and pull request.

Thanks to @akho, @hoijui, @Armour, @gguimaraesbr, @Utagai, @N4M3Z, @matt1003 and everyone else who filed a report and waited a very long time.