Skip to content

Empty lines do not display indent guides #16

@lkcampbell

Description

@lkcampbell

OS: Mac OSX Mavericks

Brackets Version: Release 0.44 development build 0.44.0-0 (master 27e6c5abb)

Extension Version: 1.3.1

Repro Steps:

  1. Create a text file that contains blank lines.
  2. Enable the indent guides

Observed Results:
gapless-observed

Expected Results (from Sublime Text):
gapless-expected

Other Notes:
This is by design. Empty lines have no indentation, so they have no indent guides. Regardless, enough people have requested this behavior that I am trying to figure out how to include it as an Extension Preference.

CodeMirror mode overlays have a couple limitations that make these "gapless" indent guides difficult to implement. To start, although there is a way to add styles to empty lines, there are no DOM elements to stylize in the empty line. Also, the tokenizer function in the overlay mode only retains the context of a single line of characters at a time but "gapless" indent guides need to know the indentation level of the line just previous to the current line in order to draw the correct number of guides.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions