Changeset View
Changeset View
Standalone View
Standalone View
src/document/katedocument.cpp
Show First 20 Lines • Show All 3344 Lines • ▼ Show 20 Line(s) | 3332 | if (!config()->backspaceIndents() || useNextBlock) { | |||
---|---|---|---|---|---|
3345 | removeText(KTextEditor::Range(beginCursor, endCursor)); | 3345 | removeText(KTextEditor::Range(beginCursor, endCursor)); | ||
3346 | // in most cases cursor is moved by removeText, but we should do it manually | 3346 | // in most cases cursor is moved by removeText, but we should do it manually | ||
3347 | // for past-end-of-line cursors in block mode | 3347 | // for past-end-of-line cursors in block mode | ||
3348 | view->setCursorPosition(beginCursor); | 3348 | view->setCursorPosition(beginCursor); | ||
3349 | } | 3349 | } | ||
3350 | 3350 | | |||
3351 | } else { | 3351 | } else { | ||
3352 | // col == 0: wrap to previous line | 3352 | // col == 0: wrap to previous line | ||
3353 | if (line > 0) { | 3353 | const Kate::TextLine textLine = m_buffer->plainLine(line - 1); | ||
3354 | | ||||
3355 | if (line > 0 && textLine) { | ||||
3354 | if (config()->wordWrap() && textLine->endsWith(QLatin1String(" "))) { | 3356 | if (config()->wordWrap() && textLine->endsWith(QLatin1String(" "))) { | ||
3355 | // gg: in hard wordwrap mode, backspace must also eat the trailing space | 3357 | // gg: in hard wordwrap mode, backspace must also eat the trailing space | ||
3356 | removeText(KTextEditor::Range(line - 1, textLine->length() - 1, line, 0)); | 3358 | removeText(KTextEditor::Range(line - 1, textLine->length() - 1, line, 0)); | ||
3357 | } else { | 3359 | } else { | ||
3358 | removeText(KTextEditor::Range(line - 1, textLine->length(), line, 0)); | 3360 | removeText(KTextEditor::Range(line - 1, textLine->length(), line, 0)); | ||
3359 | } | 3361 | } | ||
3360 | } | 3362 | } | ||
3361 | } | 3363 | } | ||
▲ Show 20 Lines • Show All 2718 Lines • Show Last 20 Lines |