Skip to content

Conversation

@randy3k
Copy link
Contributor

@randy3k randy3k commented Jan 22, 2018

  1. only invalidate ui when some keys are processed
  2. do not start_timeout if the last key is _Flush, otherwise it causes a dead loop
  3. only send flush key when the queue is not empty

close #570

1. only invalidate ui when some keys are processed 2. do not start_timeout if the last key is _Flush, otherwise it causes a dead loop 3. only send flush key when the queue is not empty
@codecov-io
Copy link

codecov-io commented Jan 22, 2018

Codecov Report

Merging #576 into 2.0 will decrease coverage by 0.1%.
The diff coverage is 100%.

Impacted file tree graph

@@ Coverage Diff @@ ## 2.0 #576 +/- ## ========================================== - Coverage 71.08% 70.98% -0.11%  ========================================== Files 123 123 Lines 11885 11892 +7 ========================================== - Hits 8448 8441 -7  - Misses 3437 3451 +14
Impacted Files Coverage Δ
prompt_toolkit/key_binding/key_processor.py 90% <100%> (-1.55%) ⬇️
prompt_toolkit/layout/dummy.py 60% <0%> (-33.34%) ⬇️
prompt_toolkit/application/current.py 85.18% <0%> (-7.41%) ⬇️
prompt_toolkit/application/dummy.py 68.75% <0%> (-6.25%) ⬇️
prompt_toolkit/layout/controls.py 74.76% <0%> (-0.32%) ⬇️
prompt_toolkit/application/application.py 77.41% <0%> (-0.27%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea5e381...12edf61. Read the comment docs.

@jonathanslenders
Copy link
Member

Thank you @randy3k!
This was a serious bug. I really appreciate it!
I'll review and merge tomorrow.

@jonathanslenders jonathanslenders merged commit 69ca980 into prompt-toolkit:2.0 Jan 23, 2018
@randy3k randy3k deleted the flush branch January 23, 2018 22:02
" Wait for timeout. "
time.sleep(self.timeout)

if counter == self._keys_pressed:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonathanslenders I think that it should check key_buffer instead of input queue, right?

@jonathanslenders
Copy link
Member

That's right. Thanks @randy3k
Fixed here: 0a64979

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants