Added a "Relative line numbers" option.

Review Request #115443 - Created Feb. 3, 2014 and submitted

Information
Miquel Sabaté Solà
kate
master
Reviewers
kate
Ok, here it goes a "crazy" idea :) In vim there's the "relativenumber" option. In short, this means that in the left border we no longer have absolute line numbers but line numbers relative to the current cursor (see the "relative.png" attachment). This is useful since in vim all commands accept an optional number (that is relative to the current cursor). This feature is, of course, configurable and set to false by default. Moreover since this is a feature that, in my opinion, only makes sense in vim, I've added this option under the "Vi Input Mode" tab in the configuration (see the "relative1.png" attachment).

This is cool and everything, but it's not fully working yet :( We don't want to be updating the left border all the time (otherwise the CPU usage goes kind of crazy, 20% more or less with KWrite). I'm only updating the left border when the user moves up or down. However, in some situations the line numbering does not update. An example of this is opening a large file, going in the middle of the file and then starting to move up and down. For some reason in this situation the left border is not updated. Since I'm kind of new to the KateView code, I'd like to hear suggestions and tips so we can fix this issue :P

Thanks for your time :) !
Manual testing. It's not working properly yet, take a look at the "Description" section above.

Files


Issues

  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Sven Brauch
Miquel Sabaté Solà
Michal Humpula
Commit Hook
This review has been submitted with commit 767176476fc07cb0dc05722ff63cc90641257703 by Miquel Sabaté to branch master.
Miquel Sabaté Solà
Review request changed

Status: Closed (submitted)

Loading...