Skip to content

Commit bd4436d

Browse files
committed
update for block reset
reset before inserting prompt, or you get a style change on the next character
1 parent 8cbf725 commit bd4436d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cmjs-shell",
3-
"version": "0.2.25",
3+
"version": "0.2.26",
44
"license": "MIT",
55
"description": "Command shell based on CodeMirror.",
66
"keywords": ["shell", "console"],

shell.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,8 @@ var Shell = function( CodeMirror_, opts ){
455455
var doc = cm.getDoc();
456456
var lineno = doc.lastLine();
457457
var lastline = cm.getLine(lineno);
458+
459+
if( !is_continuation ) block_reset[lineno] = 1;
458460

459461
prompt_len = lastline.length + prompt_text.length;
460462

@@ -467,8 +469,6 @@ var Shell = function( CodeMirror_, opts ){
467469

468470
doc.setSelection({ line: lineno, ch: prompt_len });
469471
cm.scrollIntoView({line: lineno, ch: prompt_len });
470-
471-
if( !is_continuation ) block_reset[lineno] = 1;
472472

473473
}
474474

0 commit comments

Comments
 (0)