Hi!
I haven't gotten any responses to the patch I sent in yesterday, so I
took the opportunity to open a bug for this in bugzilla
(http://bugzilla.lyx.org/show_bug.cgi?id=3811).
There are explanations there regarding the patch (which is also attached
here). Please make sure it makes sense, and if so --- could someone
please commit?
Thanks!
Dov
Index: src/BufferView.cpp
===================================================================
--- src/BufferView.cpp (revision 18652)
+++ src/BufferView.cpp (working copy)
@@ -313,7 +313,6 @@
LYXERR(Debug::DEBUG) << BOOST_CURRENT_FUNCTION << endl;
updateMetrics(false);
- switchKeyMap();
}
@@ -774,7 +773,6 @@
cur.message(_("No further undo information"));
updateFlags = Update::None;
}
- switchKeyMap();
break;
case LFUN_REDO:
@@ -784,7 +782,6 @@
cur.message(_("No further redo information"));
updateFlags = Update::None;
}
- switchKeyMap();
break;
case LFUN_FILE_INSERT:
@@ -846,7 +843,6 @@
if (b == buffer_) {
// Set the cursor
setCursor(makeDocIterator(par, 0));
- switchKeyMap();
} else {
// Switch to other buffer view and
resend cmd
theLyXFunc().dispatch(FuncRequest(
Index: src/mathed/InsetMathGrid.cpp
===================================================================
--- src/mathed/InsetMathGrid.cpp (revision 18652)
+++ src/mathed/InsetMathGrid.cpp (working copy)
@@ -1208,7 +1208,6 @@
cell(i).append(grid.cell(grid.index(r,
c)));
}
cur.clearSelection(); // bug 393
- cur.bv().switchKeyMap();
finishUndo();
break;
}
Index: src/mathed/InsetMathNest.cpp
===================================================================
--- src/mathed/InsetMathNest.cpp (revision 18652)
+++ src/mathed/InsetMathNest.cpp (working copy)
@@ -450,7 +450,6 @@
}
cur.niceInsert(topaste);
cur.clearSelection(); // bug 393
- cur.bv().switchKeyMap();
finishUndo();
break;
}
Index: src/Text3.cpp
===================================================================
--- src/Text3.cpp (revision 18652)
+++ src/Text3.cpp (working copy)
@@ -124,7 +124,6 @@
if (selecting || cur.mark())
cur.setSelection();
saveSelection(cur);
- cur.bv().switchKeyMap();
}
@@ -634,7 +633,6 @@
cutSelection(cur, true, false);
singleParUpdate = false;
}
- bv->switchKeyMap();
break;
case LFUN_DELETE_BACKWARD_SKIP:
@@ -655,14 +653,12 @@
cap::replaceSelection(cur);
breakParagraph(cur, 0);
cur.resetAnchor();
- bv->switchKeyMap();
break;
case LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT:
cap::replaceSelection(cur);
breakParagraph(cur, 1);
cur.resetAnchor();
- bv->switchKeyMap();
break;
case LFUN_BREAK_PARAGRAPH_SKIP: {
@@ -674,7 +670,6 @@
else
breakParagraph(cur, 0);
cur.resetAnchor();
- bv->switchKeyMap();
break;
}
@@ -817,7 +812,6 @@
}
bv->buffer()->errors("Paste");
cur.clearSelection(); // bug 393
- bv->switchKeyMap();
finishUndo();
break;
@@ -908,7 +902,6 @@
setLayout(cur, layout);
// inform the GUI that the layout has changed.
bv->layoutChanged(layout);
- bv->switchKeyMap();
}
break;
}
@@ -1030,7 +1023,6 @@
cap::pasteSelection(cur,
bv->buffer()->errorList("Paste"));
bv->buffer()->errors("Paste");
cur.clearSelection(); // bug 393
- bv->switchKeyMap();
bv->buffer()->markDirty();
finishUndo();
} else
@@ -1109,7 +1101,6 @@
cur.noUpdate();
}
- bv->switchKeyMap();
break;
}
@@ -1130,6 +1121,7 @@
cur.clearSelection();
Font const old_font = real_current_font;
+ bv->switchKeyMap();
docstring::const_iterator cit = cmd.argument().begin();
docstring::const_iterator end = cmd.argument().end();
for (; cit != end; ++cit)
@@ -1402,7 +1394,6 @@
Font font(Font::ALL_IGNORE);
font.setLanguage(lang);
toggleAndShow(cur, this, font);
- bv->switchKeyMap();
break;
}