Bo Peng wrote:
The attached patch is a much improved version of my previous patch.
The biggest change is that I add a ClearSelection flag to each LFUN
and call saveSelection accordingly. This version also has Abdel's fix
for mathed, table, window switch etc.
The patch itself is now easy:
1. remove all previous saveSelection(), or replace them with
theSelection().haveSelection(bvcur.selection());.
2. add ClearSelection flag to LyXAction.h/cpp
3. in text3, table, mathed dispatch functions, add
+ // if this LFUN will clear selection, saveSelection for persistent
+ // selection
+ if (lyxaction.funcHasFlag(cmd.action, LyXAction::ClearSelection))
+ cap::saveSelection(bvcur);
+
OK to apply? If you find some other LFUN's also clear selection,
simply add a ClearSelection flag to them in LyXAction.cpp.
I like it Bo, Good idea!
OK from me.
Abdel.