[Qt-creator] auto scroll in editor on focus with FakeVim

kuba kubusg at gmail.com
Sun Feb 2 21:22:36 CET 2014


On 02/02/2014 12:01 AM, andre wrote:
> On Sat, Feb 01, 2014 at 01:55:30PM +0100, kuba wrote:
>> Hi,
>>
>> I've recently noticed an annoying behavior. I use FakeVim and when I
>> unfocus qt creator window and then focus it again, the editor scrolls
>> automatically back to cursor position. It's because on QEvent::FocusIn,
>> FakeVim uses leaveFakeVim() which by default scrolls to cursor. If you
>> use leaveFakeVim(false) it does not. Is it possible to use false and not
>> scroll or do other features need it?
>>
>> Commit that introduced this change:
>> https://qt.gitorious.org/qt-creator/qt-creator/commit/a636a933d0a1f4dfd5a021c94c057f14d3a6bbf8
>>
>> possible fix (trivial):
>>
>> diff --git a/src/plugins/fakevim/fakevimhandler.cpp
>> b/src/plugins/fakevim/fakevimhandler.cpp
>> index 5bdabae..48f4558 100644
>> --- a/src/plugins/fakevim/fakevimhandler.cpp
>> +++ b/src/plugins/fakevim/fakevimhandler.cpp
>> @@ -2176,7 +2176,7 @@ void FakeVimHandler::Private::focus()
>>            updateMiniBuffer();
>>        updateHighlights();
>>
>> -    leaveFakeVim();
>> +    leaveFakeVim(false);
>>    }
>
> Thanks.
>
> There's a change no on gerrit (https://codereview.qt-project.org/#change,77147)

Thanks, i'll keep an eye on that,

Kind regards,
Kuba

>
> Best regards,
> Andre'
>




More information about the Qt-creator mailing list