Empty lines do not display indent guides #16

Closed
lkcampbell opened this Issue Oct 3, 2014 · 1 comment

Projects

None yet

1 participant

@lkcampbell
Owner

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.

@lkcampbell lkcampbell self-assigned this Oct 3, 2014
@lkcampbell
Owner

I am closing this issue as a code challenge. It is a new issue category I created for issues and enhancements that I have unsuccessfully attempted to solve.

What this means is I am stuck and I am asking for help from the community. A link to this issue will go into the extension README.md file so that others can find it and offer ideas and solutions as well. I think this is a better solution than just leaving the issue open forever or closing it as wont fix.

If, at any point in the future, a good solution emerges, I will reopen and add this enhancement.

@lkcampbell lkcampbell closed this Oct 3, 2014
This was referenced May 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment