- Layout const & style = par.layout();
- InsetLayout const & ilayout = cur.inset().getLayout();
- if (!style.pass_thru && !ilayout.isPassThru()
- && par.getFontSettings(bufparams, pos).language()->lang() != "hebrew") {
- // this avoids a double undo
- // FIXME: should not be needed, ideally
- if (!cur.selection())
- cur.recordUndo();
- cap::replaceSelection(cur);
- pos = cur.pos();
- char_type c;
- if (pos == 0)
- c = ' ';
- else if (cur.prevInset() && cur.prevInset()->isSpace())
- c = ' ';
- else
+ bool const hebrew =
+ par.getFontSettings(bufparams, pos).language()->lang() == "hebrew";
+ bool const allow_inset_quote = !(par.isPassThru() || hebrew);
+
+ if (allow_inset_quote) {
+ char_type c = ' ';
+ if (pos > 0 && (!cur.prevInset() || !cur.prevInset()->isSpace()))