update plugin files
This commit is contained in:
5
plugins/codemirror/addon/wrap/hardwrap.js
vendored
5
plugins/codemirror/addon/wrap/hardwrap.js
vendored
@@ -35,7 +35,7 @@
|
||||
for (; at > 0; --at)
|
||||
if (wrapOn.test(text.slice(at - 1, at + 1))) break;
|
||||
|
||||
if (at == 0 && !forceBreak) {
|
||||
if (!forceBreak && at <= text.match(/^[ \t]*/)[0].length) {
|
||||
// didn't find a break point before column, in non-forceBreak mode try to
|
||||
// find one after 'column'.
|
||||
for (at = column + 1; at < text.length - 1; ++at) {
|
||||
@@ -91,7 +91,8 @@
|
||||
}
|
||||
while (curLine.length > column) {
|
||||
var bp = findBreakPoint(curLine, column, wrapOn, killTrailing, forceBreak);
|
||||
if (bp.from != bp.to || forceBreak) {
|
||||
if (bp.from != bp.to ||
|
||||
forceBreak && leadingSpace !== curLine.slice(0, bp.to)) {
|
||||
changes.push({text: ["", leadingSpace],
|
||||
from: Pos(curNo, bp.from),
|
||||
to: Pos(curNo, bp.to)});
|
||||
|
||||
Reference in New Issue
Block a user