Changeset View
Changeset View
Standalone View
Standalone View
autotests/src/kateview_test.cpp
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 281 | { | |||
---|---|---|---|---|---|
304 | QCOMPARE(view->selection(), false); | 304 | QCOMPARE(view->selection(), false); | ||
305 | 305 | | |||
306 | view->setSelection(range); | 306 | view->setSelection(range); | ||
307 | view->setCursorPositionInternal(cur1); | 307 | view->setCursorPositionInternal(cur1); | ||
308 | view->cursorRight(); | 308 | view->cursorRight(); | ||
309 | QCOMPARE(view->cursorPosition(), cur2); // Be at end: foobar|haz | 309 | QCOMPARE(view->cursorPosition(), cur2); // Be at end: foobar|haz | ||
310 | QCOMPARE(view->selection(), false); | 310 | QCOMPARE(view->selection(), false); | ||
311 | 311 | | |||
312 | view->config()->setPersistentSelection(true); | 312 | view->config()->setValue(KateViewConfig::PersistentSelection, true); | ||
313 | 313 | | |||
314 | view->setSelection(range); | 314 | view->setSelection(range); | ||
315 | view->setCursorPositionInternal(cur1); | 315 | view->setCursorPositionInternal(cur1); | ||
316 | view->cursorLeft(); | 316 | view->cursorLeft(); | ||
317 | // RTL drives me nuts! | 317 | // RTL drives me nuts! | ||
318 | help = text.isRightToLeft() ? (cur1 + curDelta): (cur1 - curDelta); | 318 | help = text.isRightToLeft() ? (cur1 + curDelta): (cur1 - curDelta); | ||
319 | QCOMPARE(view->cursorPosition(), help); // Be one left: fo|obarhaz | 319 | QCOMPARE(view->cursorPosition(), help); // Be one left: fo|obarhaz | ||
320 | QCOMPARE(view->selection(), true); | 320 | QCOMPARE(view->selection(), true); | ||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |