Skip to content
Snippets Groups Projects
Commit e2370578 authored by Mitch Curtis's avatar Mitch Curtis Committed by David Schulz
Browse files

Make insertLineAbove behaviour consistent when at top of document.


Currently, pressing Ctrl+Shift+Enter to insert a line above the current
line does not work consistently when the current line is the first in
the document. For example, if the cursor (|) is not on the first line:

1. #include <QDebug>
2.|#include <QTest>

becomes

1. #include <QDebug>
2.|
3. #include <QTest>

after Ctrl+Shift+Enter. When the cursor is on the first line, however:

1.|#include <QDebug>
2. #include <QTest>

becomes

1. #include <QDebug>
2.|
3. #include <QTest>

after Ctrl+Shift+Enter. This patch corrects the above result:

1. |
2. #include <QDebug>
3. #include <QTest>

This is also in line with Eclipse's behaviour, for example.

Change-Id: I542050b6090ed0cfdf613bf67bbd2651eb99ec9d
Reviewed-by: default avatarDavid Schulz <david.schulz@digia.com>
parent 271fb797
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment