mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Fix update of cursor in tab-delete when there is a selection
The position of the cursor should not be decreased if it is already at
the start of the paragraph. This can lead to a crash when trying to
display the caret.
(cherry picked from commit 16be88ca18
)
This commit is contained in:
parent
d7e2ca377f
commit
5ca48a7a39
@ -4594,10 +4594,9 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
int const n = (c == ' ' ? 4 : 1);
|
||||
for (int i = 0; i < n
|
||||
&& !par.empty() && par.getChar(0) == c; ++i) {
|
||||
if (cur.pit() == pit)
|
||||
if (cur.pit() == pit && cur.pos() > 0)
|
||||
cur.posBackward();
|
||||
if (cur.realAnchor().pit() == pit
|
||||
&& cur.realAnchor().pos() > 0 )
|
||||
if (cur.realAnchor().pit() == pit && cur.realAnchor().pos() > 0)
|
||||
cur.realAnchor().backwardPos();
|
||||
par.eraseChar(0, tc);
|
||||
}
|
||||
|
@ -121,7 +121,10 @@ What's new
|
||||
and xltable), as this is not supported by the packages. Also fix the
|
||||
disabling mechanism in the table dialog.
|
||||
|
||||
- Fix display of integral limits on Windows (bug 13087)
|
||||
- Fix display of integral limits on Windows (bug 13087).
|
||||
|
||||
- Fix crash when deleting tabs in a selection (with S-BackTab) in a
|
||||
text-only inset (ERT, Listings...).
|
||||
|
||||
|
||||
* INTERNALS
|
||||
|
Loading…
Reference in New Issue
Block a user