Skip to content
Snippets Groups Projects
Commit c9ea0ee5 authored by Thomas Brouard's avatar Thomas Brouard
Browse files

[continuelist addon] Don't continue list when cursor is before bullet

parent e7b26592
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
var inQuote = eolState.quote !== 0; var inQuote = eolState.quote !== 0;
var line = cm.getLine(pos.line), match = listRE.exec(line); var line = cm.getLine(pos.line), match = listRE.exec(line);
if (!ranges[i].empty() || (!inList && !inQuote) || !match) { var cursorBeforeBullet = /^\s*$/.test(line.slice(0, pos.ch));
if (!ranges[i].empty() || (!inList && !inQuote) || !match || cursorBeforeBullet) {
cm.execCommand("newlineAndIndent"); cm.execCommand("newlineAndIndent");
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment