mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
Do not merge consecutive hyphens in LyX-Code
The existing code already avoids merging with typewriter font, but it does not work with LyX-Code, where the typewriter family is inherited. Therefore it is Cursor::real_current_font that must be tested. Fixes bug #9987.
This commit is contained in:
parent
158edd30ab
commit
b01d7b2262
@ -1050,7 +1050,7 @@ void Text::insertChar(Cursor & cur, char_type c)
|
||||
|
||||
pos_type pos = cur.pos();
|
||||
if (!cur.paragraph().isPassThru() && owner_->lyxCode() != IPA_CODE &&
|
||||
cur.current_font.fontInfo().family() != TYPEWRITER_FAMILY &&
|
||||
cur.real_current_font.fontInfo().family() != TYPEWRITER_FAMILY &&
|
||||
c == '-' && pos > 0) {
|
||||
if (par.getChar(pos - 1) == '-') {
|
||||
// convert "--" to endash
|
||||
|
Loading…
Reference in New Issue
Block a user