From 1490eafdd26a576dcc3832d1811802c0162dfe84 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Sat, 30 Jul 2016 12:25:24 +0800 Subject: Update CodeMirror to version 5.17.1 --- public/vendor/codemirror/addon/wrap/hardwrap.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'public/vendor/codemirror/addon/wrap/hardwrap.js') diff --git a/public/vendor/codemirror/addon/wrap/hardwrap.js b/public/vendor/codemirror/addon/wrap/hardwrap.js index 8806fbe2..04851f99 100644 --- a/public/vendor/codemirror/addon/wrap/hardwrap.js +++ b/public/vendor/codemirror/addon/wrap/hardwrap.js @@ -30,7 +30,9 @@ } function findBreakPoint(text, column, wrapOn, killTrailingSpace) { - for (var at = column; at > 0; --at) + var at = column + while (at < text.length && text.charAt(at) == " ") at++ + for (; at > 0; --at) if (wrapOn.test(text.slice(at - 1, at + 1))) break; for (var first = true;; first = false) { var endOfText = at; -- cgit v1.2.3