Skip to content
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

Request: Option for line numbers on left margin #74

Open
rjzak opened this issue Mar 26, 2022 · 1 comment
Open

Request: Option for line numbers on left margin #74

rjzak opened this issue Mar 26, 2022 · 1 comment

Comments

@rjzak
Copy link

rjzak commented Mar 26, 2022

Lots of text editors and IDEs show the line numbers to the left of the text being viewed. I know that the current line is shown in the status bar, but I'd find it more helpful to be able to see it to the left.

@raweden
Copy link

raweden commented Jun 15, 2024

I've been experimenting with adding support for this:
Pe_with_lineno

But since everything related to rendering code-editing is implemented in the PText class it becomes really awkward to manage two coordinate spaces within the same view.
If this feature would be of interest for the repository owner and contributors I would suggest to split-up the implementation of PText class into:

  • state/model (cursor-position, line model, selection state etc)
  • text-container (a class that represent each view into the document)
  • text-view (manages the state of split-view and line-gutter)

Also thinking of implementing support for folding text ranges and other controls that could be put in the line-no view such as decorators for breakpoints, lines with warning & errors.

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

No branches or pull requests

2 participants