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

Fix varying line number widths #16

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

thwllms
Copy link
Contributor

@thwllms thwllms commented Mar 3, 2023

Fixes a bug (#10) that occurs when the cursor moves and the character width of the line number changes. Sets the character width equal to the character width of the number of lines in the document. Forces a monospace font for the gutter.

bsidian-relative-linenumbers-diffiwdth-bug-fixed

Fixes a bug that occurs when the cursor moves and the character
width of the line number changes. Sets the character width equal
to the character width of the number of lines in the document.
Forces a monospace font for the gutter.
@thwllms
Copy link
Contributor Author

thwllms commented May 24, 2023

@nadavspi is this still an active project? Let me know if there's anything I can change in the PR.

@ditsuke
Copy link

ditsuke commented May 31, 2023

Would love to have this reviewed and merged soon :)

}

toDOM() {
return document.createTextNode(this.text);
}
}

function linesCharLength(state: EditorState): number {
/**
Copy link

Choose a reason for hiding this comment

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

Very nice!

@Laurensdc
Copy link

Please merge this

@nadavspi nadavspi merged commit 4da2d34 into nadavspi:main Jul 10, 2023
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.

4 participants