Skip to content
Commit 431bdf7b authored by Ilia Kats's avatar Ilia Kats Committed by Christoph Cullmann
Browse files

autoindent: fix indentation when "keep extra spaces" is enabled

This changes the way that the "keep extra spaces" option affects
keepIndent, which is called when an indentation script returns -1.
Instead of adding all the indentation of the current line to that of the
previous line, we only add the extra spaces that are not a multiple of
the indentation width. This is more consistent with how the option is
used everywhere else.

In addition, the "keep extra spaces" option is temporarily disabled when
re-indenting a block of code, which happens when pasting code or through
Selection->Format Indentation. Since we're supposed to re-indent the
code block from scratch, it makes no sense to keep extra spaces around.
parent a2f0d334
Pipeline #340723 passed with stage
in 18 minutes and 28 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment