python-prompt-toolkit v1.0.0 Release Notes

Release Date: 2016-05-05 // almost 8 years ago
  • ๐Ÿ›  Fixes:

    • Adjust minimum completion menu width to match UIControl and Window class.
    • ๐Ÿ›  Bugfix regarding weakref in InputProcessor.
    • ๐Ÿ›  Fix for pypy3: bug in WeakValueDictionary.
    • Correctly handle '0' key binding in Vi mode.
    • 0๏ธโƒฃ Also load Vi bindings by default in Application if no registry has been given.
    • Only go into selection mode if the current buffer is not empty.
    • Close PipeInput after usage.
    • Only use 16 colors in (Emacs) eterm-color.
    • ๐Ÿ›  Bugfix in "xP Vi key binding.
    • ๐Ÿ›  Bugfix in Vi { and } key binding.
    • ๐Ÿ›  Fix: use correct token for Scrollbar in MultiColumnCompletionMenuControl.
    • Handle negative values in translate_row_col_to_index.
    • ๐Ÿ– Handle decomposed unicode characters.
    • Fixed Window.always_hide_cursor. (Parameter was ignored.)
    • ๐Ÿ›  Fix in zz Vi key binding. (When render info is not available.)
    • Fix in Document.get_cursor_up_position. (When an argument is given.)

    ๐Ÿ†• New features:

    • Separated load_mouse_bindings.
    • ๐Ÿ”จ Refactoring/simplification of the key bindings: better use of filters and CLI.editing_mode.
    • โž• Added DummyOutput class and a few unit tests that test the whole CLI.
    • Use the bisect module in Document._line_start_indexes instead of a custom binary search. This should improve the performance.
    • ๐Ÿšš Stay in the same column when doing multiple up/down movements.
    • Visual improvements:
      • Implemented cursorcolumn, cursorline and colorcolumn.
      • Only reserve menu space when complete_while_typing=True or when there are completions to be displayed.
      • Support for chaining tokens for combined styles. SelectedText will now reverse the colors from the highlighting by default. Style Token.SelectedText to set a fixed foreground/background. Also for SearchMatch, we now use combined tokens.
      • Support for dark gray on Windows.
      • Default token for SystemToolbar and SearchToolbar.
      • Display selection also on empty lines.
    • Emacs key bindings improved:
      • Recognize + handle ControlDelete key.
      • Implemented meta-* and control-backslash key bindings.
    • Vi key bindings improved:
      • Handle inclusive and linewise motions properly.
      • Fix g_ motion off by one character, and don't work when cursor is in the trailing whitespace part of line.
      • Make a(/a)/i(/i)/... motions. Find enclosing brackets instead of the next bracket.
      • Update N% motion according to vim behaviors.
      • Fix | motion off by one character.
      • ge/gE motions go to end of previous word, not start.
      • Added Vi 'gm' key binding.
      • Implemented 'gq' key binding in Vi mode. (Reshape text.)
      • Vi operator/text object separation for key bindings.
      • Added 'ap' (auto-paragraph) text object.
      • Implemented Vi digraphs. ControlK will now insert a digraph.
      • Implemented vi tilde_operator.
      • Support named registers.
      • Vi < and > key bindings became operators.
      • Text objects and motions are now separate bindings.
      • Improved copy/paste in Vi mode.

    Backwards-incompatible changes:

    • 0๏ธโƒฃ Don't reset the current buffer anymore by default in CommandLineInterface.run(). Passing reset_current_buffer=True is now required.
    • ๐Ÿ‘€ Renamed MouseEventTypes to MouseEventType for consistency. The old name is still valid, but deprecated.
    • ๐Ÿ”จ Refactoring of Callbacks. All events should now receive one argument, which is the sender. (Further, Callback was renamed to Event.) This is mostly used internally.
    • ๐Ÿšš Moved on_invalidate callback from CommandLineInterface to Application
    • ๐Ÿ—„ Renamed PipeInput.send to PipeInput.send_text. (Old deprecated name is still kept as a valid alias.)
    • 0๏ธโƒฃ Renamed SimpleLexer.default_token to SimpleLexer.token. (+ backwards-compatibility.)
    • ๐Ÿ”จ Refactoring of the filters: ViStateFilter has been deprecated. (Should not be used anymore.) Use the filters, as defined in prompt_toolkit.filters.
    • editing_mode is now a property of CommandLineInterface. This is replacing the vi_mode parameter in KeyBindingManager.
    • 0๏ธโƒฃ The default accept_action for the default Buffer in Application now becomes IGNORE. This is a much more sensible default. Pass RETURN_DOCUMENT to get the previous behaviour,
    • Always expect an EventLoop instance in CommandLineInterface. Creating it in init caused a memory leak.