Fixed a inconsequent handling of indent: indent was different for recursive snippets then for the othermost snippet
This commit is contained in:
parent
93b3cc7126
commit
5d2a39a0c5
@ -263,7 +263,8 @@ class SnippetManager(object):
|
||||
start = Position(end.line, end.col - len(snippet.trigger))
|
||||
|
||||
# TODO: very much the same as above
|
||||
indent = vim.current.line[:pos.col - len(snippet.trigger)]
|
||||
text_before = vim.current.line[:pos.col - len(snippet.trigger)]
|
||||
indent = snippet._INDENT.match(text_before).group(0)
|
||||
v = snippet.value
|
||||
if indent.strip(" \n") == "":
|
||||
lines = v.splitlines()
|
||||
|
4
test.py
4
test.py
@ -532,6 +532,10 @@ class RecTabStops_InNewlineManualIndent_ECR(_VimTest):
|
||||
snippets = ("m", "M START\n$0\nM END")
|
||||
keys = "m" + EX + " m" + EX + "hi"
|
||||
wanted = "M START\n M START\n hi\n M END\nM END"
|
||||
class RecTabStops_InNewlineManualIndentTextInFront_ECR(_VimTest):
|
||||
snippets = ("m", "M START\n$0\nM END")
|
||||
keys = "m" + EX + " hallo m" + EX + "hi"
|
||||
wanted = "M START\n hallo M START\n hi\n M END\nM END"
|
||||
class RecTabStops_InNewlineMultilineWithIndent_ECR(_VimTest):
|
||||
snippets = ("m", "M START\n $0\nM END")
|
||||
keys = "m" + EX + "m" + EX + "hi"
|
||||
|
Loading…
Reference in New Issue
Block a user