mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
Fix bug 4178.
Clear out selection and cut stack buffers on exit. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@20302 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0175b39db0
commit
656e851b88
@ -692,6 +692,12 @@ void clearSelection()
|
||||
}
|
||||
|
||||
|
||||
void clearCutStack()
|
||||
{
|
||||
theCuts.clear();
|
||||
}
|
||||
|
||||
|
||||
docstring getSelection(Buffer const & buf, size_t sel_index)
|
||||
{
|
||||
return sel_index < theCuts.size()
|
||||
|
@ -75,6 +75,8 @@ void saveSelection(Cursor & cur);
|
||||
bool selection();
|
||||
/// Clear our selection buffer
|
||||
void clearSelection();
|
||||
/// Clear our cut stack.
|
||||
void clearCutStack();
|
||||
/// Paste the current selection at \p cur
|
||||
/// Does handle undo. Does only work in text, not mathed.
|
||||
void pasteSelection(Cursor & cur, ErrorList &);
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "buffer_funcs.h"
|
||||
#include "BufferList.h"
|
||||
#include "Converter.h"
|
||||
#include "CutAndPaste.h"
|
||||
#include "debug.h"
|
||||
#include "Encoding.h"
|
||||
#include "ErrorList.h"
|
||||
@ -486,6 +487,10 @@ int LyX::exec(int & argc, char * argv[])
|
||||
|
||||
void LyX::prepareExit()
|
||||
{
|
||||
// Clear the clipboard and selection stack:
|
||||
cap::clearCutStack();
|
||||
cap::clearSelection();
|
||||
|
||||
// Set a flag that we do quitting from the program,
|
||||
// so no refreshes are necessary.
|
||||
quitting = true;
|
||||
|
@ -139,6 +139,8 @@ What's new
|
||||
- Fix bug where the cursor was largely off-screen on document opening
|
||||
(bug 3427).
|
||||
|
||||
- Fix crash on quitting if some text is selected (bug 4178).
|
||||
|
||||
|
||||
* DOCUMENTATION
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user