mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 21:45:24 +00:00
* src/Text.cpp (changeCase): do not set the selection if it was not
already set. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@22700 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c61c949a2a
commit
54b0ad5904
13
src/Text.cpp
13
src/Text.cpp
@ -1088,9 +1088,11 @@ void Text::changeCase(Cursor & cur, Text::TextCase action)
|
||||
CursorSlice from;
|
||||
CursorSlice to;
|
||||
|
||||
bool gotsel = false;
|
||||
if (cur.selection()) {
|
||||
from = cur.selBegin();
|
||||
to = cur.selEnd();
|
||||
gotsel = true;
|
||||
} else {
|
||||
from = cur.top();
|
||||
getWord(from, to, PARTIAL_WORD);
|
||||
@ -1174,10 +1176,13 @@ void Text::changeCase(Cursor & cur, Text::TextCase action)
|
||||
}
|
||||
|
||||
// the selection may have changed due to logically-only deleted chars
|
||||
setCursor(cur, begPit, begPos);
|
||||
cur.resetAnchor();
|
||||
setCursor(cur, endPit, right);
|
||||
cur.setSelection();
|
||||
if (gotsel) {
|
||||
setCursor(cur, begPit, begPos);
|
||||
cur.resetAnchor();
|
||||
setCursor(cur, endPit, right);
|
||||
cur.setSelection();
|
||||
} else
|
||||
setCursor(cur, endPit, right);
|
||||
|
||||
checkBufferStructure(cur.buffer(), cur);
|
||||
}
|
||||
|
@ -153,7 +153,9 @@ What's new
|
||||
- Avoid spurious warning messages about translation of "Plain text" at
|
||||
start-up.
|
||||
|
||||
- Unicode support for missing space modifier letters.
|
||||
- Unicode support for missing space modifier letters.
|
||||
|
||||
- The case-changing functions do not select text anymore.
|
||||
|
||||
|
||||
* DOCUMENTATION
|
||||
|
Loading…
x
Reference in New Issue
Block a user