-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to display relative line numbers #270
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReText/__init__.py
Outdated
@@ -96,7 +97,6 @@ def getBundledIcon(iconName): | |||
'useWebKit': False, | |||
'windowGeometry': QByteArray(), | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not remove whitespace here.
ReText/editor.py
Outdated
while not atEnd: | ||
rect = self.editor.cursorRect(cursor) | ||
block = cursor.block() | ||
if block.isVisible(): | ||
number = str(cursor.blockNumber() + 1) | ||
number = str(cursor.blockNumber() - relativeTo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you maybe use a proper typographic minus (−) here? I.e. add .replace('-', '−')
to this string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
With this new option, the line numbers are counted as relative from the current line. Fixes retext-project#265
a71e8ed
to
bde17b9
Compare
Merged, thanks! |
With this new option, the line numbers are counted as relative from the
current line.
Fixes #265