Skip to content

Fix auto-indent behaviour when entering a new line on "indent region"…#42

Open
aeris170 wants to merge 1 commit intosantaclose:masterfrom
NeoDoa-Collective:fix-auto-indent-on-indent-begin
Open

Fix auto-indent behaviour when entering a new line on "indent region"…#42
aeris170 wants to merge 1 commit intosantaclose:masterfrom
NeoDoa-Collective:fix-auto-indent-on-indent-begin

Conversation

@aeris170
Copy link

Fixes #41 by checking both the previous and next lines for indent character and picking the largest one. Previously, only the previous line was checked. Feel free to criticize heavily :) (especially the indentBuffer2)

… begin

For example:
if (...) { //<-- you press enter here
    ...
}

Previously, you'd get 0 indent. Now you get the correct amount of indent of the next line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-indent doesn't work when entering new line on the line preceeding the indented scope

1 participant