Changeset View
Changeset View
Standalone View
Standalone View
src/view/kateview.cpp
Show First 20 Lines • Show All 1454 Lines • ▼ Show 20 Line(s) | |||||
1455 | { | 1455 | { | ||
1456 | m_pasteMenu->setEnabled(doc()->isReadWrite() && !KTextEditor::EditorPrivate::self()->clipboardHistory().isEmpty()); | 1456 | m_pasteMenu->setEnabled(doc()->isReadWrite() && !KTextEditor::EditorPrivate::self()->clipboardHistory().isEmpty()); | ||
1457 | } | 1457 | } | ||
1458 | 1458 | | |||
1459 | void KTextEditor::ViewPrivate::slotUpdateUndo() | 1459 | void KTextEditor::ViewPrivate::slotUpdateUndo() | ||
1460 | { | 1460 | { | ||
1461 | if (doc()->readOnly()) { | 1461 | if (doc()->readOnly()) { | ||
1462 | return; | 1462 | return; | ||
1463 | } | 1463 | } | ||
loh.tar: That was needed to fix the auto bracket bug, looks somehow dangerous | |||||
1464 | 1464 | | |||
1465 | m_editUndo->setEnabled(doc()->isReadWrite() && doc()->undoCount() > 0); | 1465 | m_editUndo->setEnabled(doc()->isReadWrite() && doc()->undoCount() > 0); | ||
1466 | m_editRedo->setEnabled(doc()->isReadWrite() && doc()->redoCount() > 0); | 1466 | m_editRedo->setEnabled(doc()->isReadWrite() && doc()->redoCount() > 0); | ||
1467 | } | 1467 | } | ||
1468 | 1468 | | |||
1469 | bool KTextEditor::ViewPrivate::setCursorPositionInternal(const KTextEditor::Cursor &position, uint tabwidth, bool calledExternally) | 1469 | bool KTextEditor::ViewPrivate::setCursorPositionInternal(const KTextEditor::Cursor &position, uint tabwidth, bool calledExternally) | ||
1470 | { | 1470 | { | ||
1471 | Kate::TextLine l = doc()->kateTextLine(position.line()); | 1471 | Kate::TextLine l = doc()->kateTextLine(position.line()); | ||
Show All 14 Lines | 1481 | for (; z < line_str.length() && z < position.column(); z++) { | |||
1486 | } | 1486 | } | ||
1487 | } | 1487 | } | ||
1488 | 1488 | | |||
1489 | if (blockSelection()) | 1489 | if (blockSelection()) | ||
1490 | if (z < position.column()) { | 1490 | if (z < position.column()) { | ||
1491 | x += position.column() - z; | 1491 | x += position.column() - z; | ||
1492 | } | 1492 | } | ||
1493 | 1493 | | |||
1494 | m_viewInternal->updateCursor(KTextEditor::Cursor(position.line(), x), false, true, calledExternally); | 1494 | m_viewInternal->updateCursor(KTextEditor::Cursor(position.line(), x), false, false, calledExternally); | ||
1495 | 1495 | | |||
1496 | return true; | 1496 | return true; | ||
1497 | } | 1497 | } | ||
1498 | 1498 | | |||
1499 | void KTextEditor::ViewPrivate::toggleInsert() | 1499 | void KTextEditor::ViewPrivate::toggleInsert() | ||
1500 | { | 1500 | { | ||
1501 | doc()->config()->setOvr(!doc()->config()->ovr()); | 1501 | doc()->config()->setOvr(!doc()->config()->ovr()); | ||
1502 | m_toggleInsert->setChecked(isOverwriteMode()); | 1502 | m_toggleInsert->setChecked(isOverwriteMode()); | ||
▲ Show 20 Lines • Show All 2371 Lines • Show Last 20 Lines |
That was needed to fix the auto bracket bug, looks somehow dangerous