summaryrefslogtreecommitdiff
path: root/snakemake-mode.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-05-24 23:54:32 -0400
committerKyle Meyer <kyle@kyleam.com>2016-05-24 23:54:32 -0400
commit2e71246aa406b2d51441a961ec468833656b6798 (patch)
treec580f5a6bc39631b04d92c79c793cd8fd26ab601 /snakemake-mode.el
parentc64354a4f6b8e65abd8ff0a3713253de5da59e07 (diff)
downloadsnakemake-mode-2e71246aa406b2d51441a961ec468833656b6798.tar.gz
Fix indentation for continued lines under naked rule
Diffstat (limited to 'snakemake-mode.el')
-rw-r--r--snakemake-mode.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/snakemake-mode.el b/snakemake-mode.el
index e89d25b..5b4fb28 100644
--- a/snakemake-mode.el
+++ b/snakemake-mode.el
@@ -280,11 +280,13 @@ returned."
(looking-at-p "^\\s-*$")))
(forward-line -1)))
(and (looking-at
- (concat snakemake-field-key-indented-re "\\s-*"))
+ (concat snakemake-field-key-indented-re "\\s-*\\(.*\\)"))
(not (equal (match-string-no-properties 1)
"run"))
(cond (goto-first-p
- (- (match-end 0) (line-beginning-position)))
+ (if (equal (match-string-no-properties 2) "")
+ above-indent
+ (- (match-beginning 2) (line-beginning-position))))
((< field-indent initial-indent)
field-indent)))))))))))))