Line Numbers and long lines

Steps to reproduce

  • Have the “line numbers” plugin enabled.
  • Paste the following content into a note (excluding the triple backticks):
- If you have the line numbers plugin enable, and you have content that's long enough to cause horizontal scrolling in the editor window, and then you scroll that editor to the right
- Then the line numbers will overlap with the content.

Example:

First Header | Second Header | Third Header
------------ | ------------  | ------------
Content from cell 1 | Content from cell 2 | Content from cell 3
Content in the first column | Content in the second column | Content in the third column

Expected result

Here’s a screenshot taken from Sublime Text which shows how that application handles this situation. I’d expect some behaviour similar to what Sublime Text does.

image

Actual result

image

Environment

  • Operating system: Windows 10
  • Obsidian version: v0.7.3
1 Like

Possibly related to:

Tested in 0.7.4, issue still occurs.

If we fix a bug, we mark it as archived. No need to report that the issue still occurs.

Okay noted, thank you.

Windows 10. Obsidian Dark Theme. Third-party CSS & plugins were disabled to confirm.

Inserting a long element that does not line-wrap, such as a table, causes the line number gutter to overhang when horizontally scrolled to the right.

For example, insert the following long MD table into an MD file and horizontally scroll:

| table header | table header 2 | table header 3 | table header 4 | table header 5 | table header 6 | table header 7 | table header 8 | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| ------------ | -------------- | -------------- | -------------- | -------------- | -------------- | -------------- | -------------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |

The bug should appear similarly to the below:

overhang_gutter

The fix for this is

.CodeMirror-gutter.CodeMirror-linenumbers, .CodeMirror-gutter.CodeMirror-foldgutter {
    background-color: var(--background-primary);
}
1 Like

Thanks @forever! Will be fixed in 0.11.12.

(Are you foreveryone on Discord by any chance?)

Yep, that’s my discord name!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.