mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-31 10:55:44 +00:00
Allow inserting tabs at the start of the REPL input
* If there is no non-whitespace input, we shouldn't try to autocomplete
This commit is contained in:
@@ -2229,9 +2229,17 @@ void PythonShell::interactive_keypress(QKeyEvent *event)
|
||||
{
|
||||
// manually trigger a completion with tab
|
||||
case Qt::Key_Tab:
|
||||
m_InteractiveCompleter->activated(
|
||||
m_InteractiveCompleter->popup()->selectionModel()->currentIndex());
|
||||
m_InteractiveCompleter->popup()->hide();
|
||||
// allow prefixed tabs to be inserted
|
||||
if(ui->lineInput->text().trimmed().isEmpty())
|
||||
{
|
||||
ui->lineInput->insert(lit("\t"));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_InteractiveCompleter->activated(
|
||||
m_InteractiveCompleter->popup()->selectionModel()->currentIndex());
|
||||
m_InteractiveCompleter->popup()->hide();
|
||||
}
|
||||
return;
|
||||
// if a completion is in progress ignore any events the completer will process
|
||||
case Qt::Key_Return:
|
||||
|
||||
Reference in New Issue
Block a user