Skip to content

Commit

Permalink
Click handler on statusbar to toggle col number ruler
Browse files Browse the repository at this point in the history
shift right-click will toggle.
  • Loading branch information
tangledhelix committed Dec 16, 2024
1 parent 856bc36 commit 72058e3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/guiguts/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ def rowcol_str() -> str:

the_statusbar.add(
"rowcol",
tooltip="Click: Go to line\nShift click: Toggle line numbers",
tooltip="Click: Go to line\nShift click: Toggle line numbers\nShift right-click: Toggle column numbers",
update=rowcol_str,
)
the_statusbar.add_binding("rowcol", "ButtonRelease-1", self.file.goto_line)
Expand All @@ -822,6 +822,11 @@ def rowcol_str() -> str:
"Shift-ButtonRelease-1",
lambda: preferences.toggle(PrefKey.LINE_NUMBERS),
)
the_statusbar.add_binding(
"rowcol",
"Shift-ButtonRelease-2",
lambda: preferences.toggle(PrefKey.COLUMN_NUMBERS),
)

the_statusbar.add(
"img",
Expand Down

0 comments on commit 72058e3

Please sign in to comment.