mirror of https://github.com/KLayout/klayout.git
Macro IDE: completer catches more words
This commit is contained in:
parent
a4039a1bf8
commit
c661db8279
|
|
@ -652,6 +652,15 @@ void MacroEditorPage::fill_completer_list ()
|
|||
int pos = c.anchor ();
|
||||
c.select (QTextCursor::WordUnderCursor);
|
||||
int pos0 = c.selectionStart ();
|
||||
|
||||
if (pos0 >= pos) {
|
||||
// if there is no word before, move to left to catch one
|
||||
c = mp_text->textCursor ();
|
||||
c.movePosition (QTextCursor::WordLeft, QTextCursor::KeepAnchor);
|
||||
pos = c.anchor ();
|
||||
pos0 = c.selectionStart ();
|
||||
}
|
||||
|
||||
if (pos0 >= pos) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue