There seem to be cases where QTextLines::isValid() returns true but
its lines_ are empty.
Change-Id: Ia4b9a66aec8d10754f7ff7dd0c90e7295e2a2220
Reviewed-by: hjk <hjk121@nokiamail.com>
Also move initialization before connection setup.
Task-number: QTCREATORBUG-10443
Change-Id: I3f3d074534a44a0aa6b8cc60c8ffbcd22d96ca33
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Fixes handling of commands that switch or create new editors
(<C-W><C-W>, <C-W>V).
Change-Id: Iefad2571390afeb085c7c270187e5de451892521
Reviewed-by: hjk <hjk121@nokiamail.com>
fakevimhandler.cpp:941:43: warning: comparison of integers of different signs: 'Int' (aka 'unsigned int') and 'int' [-Wsign-compare]
return m_xkey == c && m_modifiers != int(HostOsInfo::controlModifier());
~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Change-Id: I360873f0c74512d95ca8ecaac4f1ab0a477877e7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Search in visual mode should select text up to matched position.
Using commands should work with search movement; e.g. 'd2/needle<CR>'.
Commands should be also properly canceled if search movement fails.
Change-Id: Ic695dccaf3f36ccae2f2b1a93f888d5ba9805a78
Reviewed-by: hjk <hjk121@nokiamail.com>
On some keyboards, '>' character can be produced using Shift key. But
recorded macro shouldn't contain '<S->>', which cannot be properly
parsed, instead it will be '<S-<GT>>' (as '<LT>' for '<').
Change-Id: Iac3759029b6ff8c9e690c4728e35048c0b6046f9
Reviewed-by: hjk <hjk121@nokiamail.com>
Implements :omap (and :onoremap) for defining user mappings for movement
while in operator-pending mode (after commands 'c', 'd', '>' and
others).
Change-Id: I07a1e90bf5c649ef5bb53d1de873817dc7348e19
Reviewed-by: hjk <hjk121@nokiamail.com>
Fixes scrolling to center text cursor on screen on j/k and h/l on last
visible line.
Change-Id: I65a1144a99f44a3df4217bc8eb6ee5ae6ef89ad4
Reviewed-by: hjk <hjk121@nokiamail.com>
Partially reverts commit b9cc16e405.
Using QTextDocument::revision() to keep track which undo/redo command
should be used next doesn't help much and it's more difficult to use
than QTextDocument::availableUndoSteps().
Task-number: QTCREATORBUG-9784
Change-Id: I656e1e964477de0f387c80b9384a32e0d8dab39f
Reviewed-by: hjk <hjk121@nokiamail.com>
Use QTextDocument::onContentsChanged() to monitor text inserted and
removed in insert mode for dot command (or just repeat with 2i, 3o etc.)
to re-insert same text.
Works even if auto-completion is replacing '.' with '->' for pointers.
Change-Id: Ie39edcdc9ec60bcf6c7d10f021248c3a0aee76b6
Reviewed-by: hjk <hjk121@nokiamail.com>
Possible scroll bar values (range from minimum to maximum) cannot -- in
some cases -- be linearly mapped to line numbers.
Change-Id: I8833dae057e2be39295f3aae906bb79e16269db7
Reviewed-by: hjk <hjk121@nokiamail.com>
Mostly 3 leading spaces converted to 4
A few other indentation issues
Change-Id: Ib0db5925cac4d2999faf5699cd570884cbcd4863
Reviewed-by: hjk <hjk121@nokiamail.com>
Set correct position for commands I, A in visual mode.
Don't repeat insert mode [count] times if cursor moved in insert mode
(or after <C-O> command).
Don't repeat movement in insert mode ([count] is used only to repeat
the first inserted text).
Dot command for insert mode should be cleared if cursor moved and user
started inserting a text.
Change-Id: I4dbd0fa4e7ecedc6623838c9ad855f83276da2ce
Reviewed-by: hjk <hjk121@nokiamail.com>
Allow movement with <C-W> and h, j, k, l, plus capital alternatives to
focus furthest split.
Command <C-W>o or :only closes all splits except the current one.
Change-Id: I14ed57cff5d639c22d3eb325560922c10d0c92bf
Reviewed-by: hjk <hjk121@nokiamail.com>