-
由 David Poeschl 提交于
Fixes #4652 When an expanded snippet's $end$ position ends up on its own line after formatting (potentially with leading whitespace), we calculate & store its indentation level and then remove any leading whitespace. Then when the snippet is completed (either automatically or after field editing is complete), we position the caret in virtual space at this stored indentation level. The bug here was one of mismatched units. Specifying the position in virtual space is done in columns, but the indentation was being stored as a count of characters. When the "Keep Tabs" option is enabled, an intended indentation of 3 tabs (12 spaces if the tab size is 4) would result in the caret being positioned at column 3 in virtual space instead of column 12.
af6c343b