| 1923 | // ── Type picker (user list) ── |
| 1924 | |
| 1925 | void RcxEditor::showTypeAutocomplete() { |
| 1926 | if (!m_editState.active || |
| 1927 | (m_editState.target != EditTarget::Type && m_editState.target != EditTarget::ArrayElementType)) |
| 1928 | return; |
| 1929 | // Replace original type with spaces (keeps layout, clears for typing) |
| 1930 | int len = m_editState.original.size(); |
| 1931 | QString spaces(len, ' '); |
| 1932 | m_sci->SendScintilla(QsciScintillaBase::SCI_SETSEL, |
| 1933 | m_editState.posStart, m_editState.posEnd); |
| 1934 | m_sci->SendScintilla(QsciScintillaBase::SCI_REPLACESEL, |
| 1935 | (uintptr_t)0, spaces.toUtf8().constData()); |
| 1936 | |
| 1937 | // Position cursor at start |
| 1938 | m_sci->SendScintilla(QsciScintillaBase::SCI_GOTOPOS, m_editState.posStart); |
| 1939 | |
| 1940 | showTypeListFiltered(QString()); // Show full list initially |
| 1941 | } |
| 1942 | |
| 1943 | void RcxEditor::showTypeListFiltered(const QString& filter) { |
| 1944 | if (!m_editState.active || |