Skip to content

Line Numbers #7536

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Line Numbers #7536

wants to merge 3 commits into from

Conversation

ayohenry
Copy link

Alternative solution to issue #6361, added keyboard shortcut to toggle line numbers on/off; ctrl + shift + L.

Copy link

@spacegaier spacegaier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The option to toggle the line numbers does already exist in the preferences. I am not sure what the benefit is of moving that into the menu. Not sure about a scenario where you want to consistently switch them on and then off again.
Adding a shortcut on top, is then even going one step further which I am not sure about. It blocks the shortcut also for some more usuful feature in the future.

@@ -1877,6 +1877,15 @@ public void handleFontSizeChange(int change) {
PreferencesData.set("editor.font", StringUtils.join(pieces, ','));
getEditors().forEach(Editor::applyPreferences);
}

public void toggleLineNumber() {
if (PreferencesData.getBoolean("editor.linenumbers")) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be shortened to:
PreferencesData.setBoolean("editor.linenumbers", !PreferencesData.getBoolean("editor.linenumbers"));

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants