Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Conversation

@petetnt
Copy link
Collaborator

@petetnt petetnt commented Dec 1, 2015

In #11909 we added a lineRender hack from https://codemirror.net/demo/indentwrap.html. This hack alone works fine for files using spaces as whitespace. However, the PR was missing this additional hack from the pages stylesheet:

      .CodeMirror pre > * { text-indent: 0px; }

This PR adds that, thus fixing #11963

@abose @stowball @rroshan1

edit: Steps to repro:

  1. Create new file foo.html
  2. Set indentation to Tab size: 4 from Brackets
  3. Write <h1>Foo</h1>
  4. Try to indent it with by pressing tab
    -> Text doesn't move at all

After PR:

  1. Create new file foo.html
  2. Set indentation to Tab size: 4 from Brackets
  3. Write <h1>Foo</h1>
  4. Try to indent it with by pressing tab
    -> Tabs work as indented and the indent-wrap hack still works too

@abose abose added this to the Release 1.6 milestone Dec 1, 2015
@abose abose added the F Editor label Dec 1, 2015
@abose
Copy link
Contributor

abose commented Dec 1, 2015

I tried the above steps, but I couldn't repro the issue in my machine. Tabs work fine with the above steps. Am I missing some steps?

@petetnt
Copy link
Collaborator Author

petetnt commented Dec 1, 2015

@abose Hmm, there shouldn't be any other steps: just make sure that your Brackets indentation mode is set to tabs. The width of .cm-tab is 0px so negative text-indent eats away the padding-left, resulting in zero indentation.

Unless there are some difference between platforms how the tabs are handled. I am running on Windows 8.1. at the moment.

abose added a commit that referenced this pull request Dec 1, 2015
Port missing piece of the indent-wrap hack from Codemirror. Fixes #11963
@abose abose merged commit 44487b7 into adobe:master Dec 1, 2015
@abose
Copy link
Contributor

abose commented Dec 1, 2015

"useTabChar" preference was not set. Now I can repro this.
Verified that works. Merging.
Thanks @petetnt

@petetnt
Copy link
Collaborator Author

petetnt commented Dec 1, 2015

🆒

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants