[hardbreak addon] Adjust formatting

Issue #6338
This commit is contained in:
Marijn Haverbeke 2020-07-08 09:30:29 +02:00
parent 0682bcc8d5
commit 09943f9eaf
1 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@
for (; at > 0; --at)
if (wrapOn.test(text.slice(at - 1, at + 1))) break;
if ((at == 0) && (!forceBreak)) {
if (at == 0 && !forceBreak) {
// 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,7 @@
}
while (curLine.length > column) {
var bp = findBreakPoint(curLine, column, wrapOn, killTrailing, forceBreak);
if ((bp.from != bp.to) || (forceBreak)) {
if (bp.from != bp.to || forceBreak) {
changes.push({text: ["", leadingSpace],
from: Pos(curNo, bp.from),
to: Pos(curNo, bp.to)});