LYXERR(Debug::DEBUG) << BOOST_CURRENT_FUNCTION << endl;
updateMetrics(false);
- switchKeyMap();
}
}
-void BufferView::switchKeyMap()
+void BufferView::translateAndInsert(char_type c, Text * t, Cursor & cur)
{
if (!lyxrc.rtl_support)
return;
if (intl_->keymap == Intl::SECONDARY)
intl_->keyMapPrim();
}
+
+ intl_->getTransManager().translateAndInsert(c, t, cur);
}
cur.message(_("No further undo information"));
updateFlags = Update::None;
}
- switchKeyMap();
break;
case LFUN_REDO:
cur.message(_("No further redo information"));
updateFlags = Update::None;
}
- switchKeyMap();
break;
case LFUN_FILE_INSERT:
if (b == buffer_) {
// Set the cursor
setCursor(makeDocIterator(par, 0));
- switchKeyMap();
} else {
// Switch to other buffer view and resend cmd
theLyXFunc().dispatch(FuncRequest(
/// return the pixel height of the document view.
int workHeight() const;
- /// switch between primary and secondary keymaps for RTL entry.
- void switchKeyMap();
+ /// translate and insert a character, using the correct keymap.
+ void translateAndInsert(char_type c, Text * t, Cursor & cur);
/// return true for events that will handle.
FuncStatus getStatus(FuncRequest const & cmd);
if (selecting || cur.mark())
cur.setSelection();
saveSelection(cur);
- cur.bv().switchKeyMap();
}
cutSelection(cur, true, false);
singleParUpdate = false;
}
- bv->switchKeyMap();
break;
case LFUN_DELETE_BACKWARD_SKIP:
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: {
else
breakParagraph(cur, 0);
cur.resetAnchor();
- bv->switchKeyMap();
break;
}
}
bv->buffer()->errors("Paste");
cur.clearSelection(); // bug 393
- bv->switchKeyMap();
finishUndo();
break;
setLayout(cur, layout);
// inform the GUI that the layout has changed.
bv->layoutChanged(layout);
- bv->switchKeyMap();
}
break;
}
cap::pasteSelection(cur, bv->buffer()->errorList("Paste"));
bv->buffer()->errors("Paste");
cur.clearSelection(); // bug 393
- bv->switchKeyMap();
bv->buffer()->markDirty();
finishUndo();
} else {
cur.noUpdate();
}
- bv->switchKeyMap();
break;
}
docstring::const_iterator cit = cmd.argument().begin();
docstring::const_iterator end = cmd.argument().end();
for (; cit != end; ++cit)
- bv->getIntl().getTransManager().
- translateAndInsert(*cit, this, cur);
+ bv->translateAndInsert(*cit, this, cur);
cur.resetAnchor();
moveCursor(cur, false);
Font font(Font::ALL_IGNORE);
font.setLanguage(lang);
toggleAndShow(cur, this, font);
- bv->switchKeyMap();
break;
}
theLyXFunc().handleKeyFunc(cmd.action);
if (!cmd.argument().empty())
// FIXME: Are all these characters encoded in one byte in utf8?
- bv->getIntl().getTransManager()
- .translateAndInsert(cmd.argument()[0], this, cur);
+ bv->translateAndInsert(cmd.argument()[0], this, cur);
break;
case LFUN_FLOAT_LIST: {