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

Empty lines do not display indent guides #16

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

Empty lines do not display indent guides #16

lkcampbell opened this issue Oct 3, 2014 · 1 comment

Comments

@lkcampbell
Copy link
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
Copy link
Owner Author

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.

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

No branches or pull requests

1 participant