Skip to content

fix: keep Tab-as-spaces indentation on blank lines (LangCfg)#951

Merged
sebthom merged 1 commit into
eclipse-tm4e:mainfrom
sebthom:issue-949
Nov 3, 2025
Merged

fix: keep Tab-as-spaces indentation on blank lines (LangCfg)#951
sebthom merged 1 commit into
eclipse-tm4e:mainfrom
sebthom:issue-949

Conversation

@sebthom
Copy link
Copy Markdown
Member

@sebthom sebthom commented Nov 3, 2025

Pressing Tab with "Insert spaces for tabs"inserted spaces that were treated like a paste and reindented via replaceIndent(..., false), which returned an empty string and removed the indentation.

Skip reindentation for single-line, whitespace-only inserts so user-inserted spaces are preserved on blank lines. Multi-line pastes and non-whitespaceinserts remain unchanged.

Pressing Tab with "Insert spaces for tabs"inserted spaces that were
treated like a paste and reindented via `replaceIndent(..., false)`,
which returned an empty string and removed the indentation.

Skip reindentation for single-line, whitespace-only inserts so
user-inserted spaces are preserved on blank lines. Multi-line pastes and
non-whitespaceinserts remain unchanged.
@sebthom sebthom changed the title fix(langcfg): keep Tab-as-spaces indentation on blank lines fix: keep Tab-as-spaces indentation on blank lines (LangCfg) Nov 3, 2025
@github-actions github-actions Bot added the bug label Nov 3, 2025
@sebthom
Copy link
Copy Markdown
Member Author

sebthom commented Nov 3, 2025

@ddscharfe This PR is to address the issue you reported in #949 can you please try to install this snapshot version of TM4E and confirm that the issue is solved: https://github.com/eclipse-tm4e/tm4e/actions/runs/19042992902/artifacts/4452012289

@ddscharfe
Copy link
Copy Markdown
Contributor

@sebthom That was quick, thanks a lot! This solves the issue.

@sebthom sebthom merged commit 099cbb5 into eclipse-tm4e:main Nov 3, 2025
20 of 21 checks passed
@sebthom sebthom deleted the issue-949 branch November 3, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants