Merge branch 'rcorre-completer_unicode'
This commit is contained in:
commit
d1f21745e4
@ -157,6 +157,7 @@ class Completer(QObject):
|
||||
result = runner.parse(text, fallback=True, keep=True)
|
||||
parts = [x for x in result.cmdline if x]
|
||||
pos = self._cmd.cursorPosition() - len(self._cmd.prefix())
|
||||
pos = min(pos, len(text)) # Qt treats 2-byte UTF-16 chars as 2 chars
|
||||
log.completion.debug('partitioning {} around position {}'.format(parts,
|
||||
pos))
|
||||
for i, part in enumerate(parts):
|
||||
|
@ -22,3 +22,8 @@ Feature: Command bar completion
|
||||
# Make sure qutebrowser doesn't hang
|
||||
And I run :message-info "Still alive!"
|
||||
Then the message "Still alive!" should be shown
|
||||
|
||||
Scenario: Crash when pasting emoji into the command line (#2007)
|
||||
Given I open about:blank
|
||||
When I run :set-cmd-text -s :🌀
|
||||
Then no crash should happen
|
||||
|
Loading…
Reference in New Issue
Block a user