Skip to content

Commit

Permalink
Add '=' case to autoindent
Browse files Browse the repository at this point in the history
  • Loading branch information
uninhm committed Aug 16, 2021
1 parent 0f39d0c commit 69db282
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/moepkg/editor.nim
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ proc insertIndentInNimForKeyEnter(bufStatus: var BufferStatus,
line.splitWhitespace == @[ru "let"] or
line.splitWhitespace == @[ru "const"] or
(line.len > 6 and line[line.len - 6 .. ^1] == ru "object") or
line[^1] == ru ':'):
line[^1] == ru ':' or
line[^1] == ru '='):
let
count = countRepeat(line, Whitespace, 0) + tabStop
oldLine = bufStatus.buffer[windowNode.currentLine + 1]
Expand Down

0 comments on commit 69db282

Please sign in to comment.