CHANGELOG
=========

About the version numbering:
    As long as the version number starts with a zero, we allow backwards
    incompatible changes between each release. This is required order to move
    forward. However, we do our best to keep it to a minimum and ensure
    backwards-compatibility in the most used public APIs.
    When the library stabilizes, which is hopefully very soon, we will switch
    to a <breaking>.<feature>.<fix> style of numbering.


0.57: 2016-01-04
----------------

Fixes:
- Made `max_render_postpone_time` configurable. The current default was bad.
  (We should probably always draw the UI once every cycle of the event loop.)


0.56: 2016-01-03
----------------

Fixes:
- Fix in bracketed paste. It was not correctly enabled for each prompt.


0.55: 2016-01-03
----------------

New features:
- Implemented bracketed paste mode. (This allows much faster pasting, as well
  as pasting without going into paste mode. This makes sure that indentation in
  ptpython for instance is kept correctly.)
- Added support for italic output and blink. (For terminals that support it.)
- Added get_horizontal_scroll, get_vertical_scroll and always_hide_cursor
  parameters to Window.
- Refactoring of the posix event loop. Better scheduling of all tasks/FDs to
  avoid starvation. (Everything should feel more responsive in high CPU
  situations.)
- Added get_default_char function to TokenListControl.
- AppendAutoSuggestion now accepts a token parameter.
- Support for ansi color names in styles.
- Accept get_width/get_height parameters in Float.
- Added Output.write_raw and accept 'raw' parameter in
  CommandLineInterface.stdout_proxy.
- Better caching of tokens in TokenListControl.
- Add mouse support to TokenListControl.
- Display "Window too small" when the window becomes too small.
- Added 'bell' function to Output.
- Accept weights in HSplit/VSplit.
- Added Registry.remove_binding method to dynamically remove key bindings.
- Added focus_on_click parameter to BufferControl.
- Introduced BufferMapping class as a wrapper around the buffers dictionary.
  This one also contains the focus stack.
- Improved 'v' and 'V' key bindings. Allow switching between line and character
  selection modes.
- Added layout.highlighters. A new, much faster way to do selection and search
  highlighting.
- Make search_state dynamic for key bindings.
- Added 'sentence' option to WordCompleter.
- Cache Document.lines for better performance.
- Implementation of BLOCK selections. (Cut, copy, paste.)
- Accept a 'reserve_space_for_menu' parameter in the shortcuts. (This is an
  integer.)
- Support for 24bit true color on vt100 terminals.
- Added CommandLineInterface.on_invalidate event.
- Added __version__ to __init__.py.

Fixes:
- Always show cursor in the 'done' state.
- Allow HSplit to have zero children.
- Bugfix for handling of backslash on Windows with some non-us keyboards.
  (Ptpython issue #28.)
- Never render characters outside the visible screen region.
- Fix in WordCompleter. When case insensitive and input contained uppercase.
- Highlight search match when the cursor is at any position on the match. (not
  just the beginning.)

Backwards-incompatible changes:
(Most changes will probably not have an impact on external applications.)
- Change in the `Style` API. This allows caching of Attrs in renderer and
  faster rendering.  (Style now has a get_attrs_for_token instead of a
  get_token_to_attributes_dict method.)
- Removed DefaultStyle. Created PygmentsStyle.from_defaults class method instead.
- Removed AbortAction.IGNORE. This was ambiguous.
- Accept 'cli' parameter in 'walk' and 'find_window_for_buffer_name'.
- The focus stack is now stored in BufferMapping.
- ViStateFilter and KeyBindingManager now accept a get_vi_state callable
  instead of vi_state itself. (This way a key bindings registry becomes
  stateless.)
- HighlightSearchProcessor and HighlightSelectionProcessor became deprecated.
  (Use highlighters instead.)


0.54: 2015-10-29
----------------

New features:
- Allow CommandLineInterface to run in any thread.
- Hide cursor while rendering.
- Added add_reader/remove_reader methods to EventLoop.
- Support for 'reverse' style.
- Redraw more lazy, by using invalidate.
- Added show_cursor property to Screen.
- Center or right align text in TokenListControl also when it spans multiple
  lines.

Fixes:
- Bugfix in PathCompleter. (Expanduser issue.)
- Fix in signal handler.
- Use utf-8 encoding in Vt100_Output by default.
- Use correct default token in BufferControl.
- Fix in ControlL key binding. Use @handle to allow desactivation.

Backwards-incompatible changes:
- Renamed create_default_layout to create_prompt_layout
- Renamed create_default_application to create_prompt_application
- Renamed Layout to Container.
- Renamed CommandLineInterfaces.request_redraw to invalidate.
- Changed the actual value of SEARCH_BUFFER, DEFAULT_BUFFER, SYSTEM_BUFFER and
  DUMMY_BUFFER.
- Changed order of keyword arguments of the BufferControl class. "buffer_name"
  now comes first.
- Removed old pt(i)python code.

0.53: 2015-10-06
----------------

New features:
- Handling of the insert key in Vi mode.
- Added 'zt' and 'zb' Vi key bindings.
- Added delete key binding for deleting selected text.
- Select word below cursor on double mouse click.
- Added `wrap_lines` option to TokenListControl.
- Added `KeyBindingManager.for_prompt`.

Fixes:
- Fix in rendering output.
- Reset renderer correctly in run_in_terminal.
- Only reset buffer when using `AbortAction.RETRY`.
- Fix in handling of exit (Ctrl-D) key presses.
- Fix in `CompleteEvent`. Correctly set `completion_requested`.

Backwards-incompatible changes:
- Renamed `ValidationError.index` to `ValidationError.cursor_position`.
- Renamed `shortcuts.get_input` to `shortcuts.prompt`.
- Return empty string instead of None in
  `Document.current_char`/`char_before_cursor`.


0.52: 2015-09-24
----------------

Fixes:
- Fix in auto suggestion: hide suggestion when accepting input.


0.51: 2015-09-24
----------------

New features:
- Mouse support. (Scrolling and clicking for vt100 terminals. For Windows only
  clicking.) Both the autocompletion menus and buffer controls respond to
  scolling and clicking.
- Added auto suggestions. (Like the fish shell.)
- Stdout proxy become thread safe.
- Linewrapping can now be disabled, instead we get horizontal scrolling.
- Line numbering can now be relative. Like the vi 'relativenumber' option.

Fixes:
- Fixed excessive scrolling in Windows.
- Bugfix in search highlighting.
- Copy all words during repetition of Ctrl-W presses.
- The 'libs' folder has been removed.
- Fix in MultiColumnCompletionsMenu: don't create very big columns.

Backwards-incompatible changes:
- Disable search by default in KeyBindingManager.
- Separated abort/exit key bindings. Disabled by default in KeyBindingManager.
- 'Ignore' became the default on_abort action in `Application`.
- 'Ignore' became the default accept_action in `Buffer`.
- The layout processors have been refactored. The API is changed.
- `SwitchableValidator` has been renamed to `ConditionalValidator`.
- `WindowRenderInfo` has several incompatible changes.
- Margins have been refactored completely. Now it's the window that has the
  margin instead of `BufferControl`. Is is both much more performant and
  flexible.


0.50: 2015-09-06
----------------

Fix:
- Leaving of alternate screen on Windows.


0.49: 2015-09-06
----------------

New features:
- Added MANIFEST.in
- Better support for multiline prompts in shortcuts.
- Added Document.set_document method.
- Added 'default' argument to `shortcuts.create_default_application`.
- Added `align_center` option for `TokenListControl`.
- Added optional key bindings for full page navigation. (Moved key bindings
  from pyvim into prompt-toolkit.)
- Accepts default_char in BufferControl for filling the background.
- Added InFocusStack filter.

Fixes:
- Small fix in TokenListControl: use the right Char for aligning.

Backwards-incompatible changes:
- Removed deprecated 'tokens' attribute from GrammarLexer.


0.48: 2015-09-02
----------------

New features:
- run_in_terminal now returns the result of the called function.
- Made history attribute of Buffer class public.
- Added support for sub CommandLineInterfaces.
- Accept optional vi_state parameter in KeyBindingManager.

Fixes:
- Pop-up menu positioning. The menu was shown too often above instead of below
  the cursor.
- Fix in Control-W key binding. When there is only whitespace before the
  cursor, delete the whitespace.
- Rendering bug fix in open_in_editor: run editor using cli.run_in_terminal.
- Fix in renderer. Correctly reserve the vertical space as required by the
  layout.
- Small fix in Margin ABC.
- Added __iter__ to History ABC.
- Small bugfix in CommandLineInterface: create correct eventloop when no
  eventloop was given.
- Never schedule a second repaint operation when a previous was not yet
  executed.


0.47: 2015-08-19
----------------

New features:
- Added `prompt_toolkit.layout.utils.iter_token_lines`.
- Allow `None` values on the focus stack.
- Buffers can be readonly. Added `IsReadOnly` filter.
- `eager` behaviour for key bindings. When a key binding is eager it will be
  executed as soon as it's matched, even when there is another binding that
  starts with this key sequence.
- Custom margins for BufferControl.

Fixes:
- Don't trigger autocompletion on paste.
- Added `pre_run` parameter to CommandLineInterface.
- Correct invalidation of BeforeInput and AfterInput.
- Correctly handle transparancy. (For floats.)
- Small change in the algorithm to determine Window dimensions: keep in the
  bounds of the Window dimensions.

Backwards-incompatible changes:
- There a now a `Lexer` abstract base class. Every lexer should be an instance
  of that class, and Pygments lexers should be wrapped in a `PygmentsLexer`
  class. `prompt_toolkit.shortcuts` still accepts Pygments lexers directly for
  backwards-compatibilty.
- BufferControl no longer has a `show_line_numbers` argument. Pass a
  `NumberredMargin` instance instead.
- The `History` class became an abstract base class and only defines an
  interface. The default history class is now called `InMemoryHistory`.


0.46: 2015-08-08
----------------

New features:
- By default, in shortcuts, only show search highlighting when the search is
  the current input buffer.
- Accept 'count' for all search operations. (For repetition.)
- `shortcuts.create_default_layout` accepts a `multiline` parameter.
- Show meta display text for completions also in multi-column mode.

Fixes:
- Correct invalidation of DefaultPrompt when search direction changes.
- Correctly include/exclude current cursor position in search.
- More consistency in styles.
- Fix in ConditionalProcessor.has_focus.
- Python 2.6 compatibility fix.
- Show cursor at the correct position during reverse-i-search.
- Fixed stdout encoding bug for vt100 output.

Backwards-incompatible changes:
- Use of `ConditionalContainer` everywhere. The `Window` class no longer
  accepts a `filter` argument to decide about the visibility. Instead
  wrapping inside a `ConditionalContainer` class is required.


0.45: 2015-07-30
----------------

Fixes:
- Bug fix on OS X: correctly detect platform as not Windows.


0.44: 2015-07-30
----------------

Fixes:
- Fixed bug in eventloops: handle timeout correctly, even when there is an eventhook.
- Bug fix in open-in-editor: set correct cursor position.

New features:
- CompletionsMenu got a scroll_offset.
- Use 256 colors and ANSI sequences when ConEmu ANSI support has been detected.
- Added PyperclipClipboard for synchronisation with the system clipboard.
  and clipboard parameter in shortcut functions.
- Filter for enabling/disabling handling of Vi 'v' binding.


0.43: 2015-07-15
----------------

Fixes:
- Windows bug fix. STD_INPUT_HANDLE should be c_ulong instead of HANDLE.
  (This caused crashes on some systems.)

New features:
- Added eventloop and patch_stdout parameters to get_input.
- Inputhook support added.
- Added ShowLeadingWhiteSpaceProcessor and ShowTrailingWhiteSpaceProcessor
  processors.
- Accept Filter as multiline parameter in 'shortcuts'.
- MultiColumnCompletionsMenu + display_completions_in_columns parameter
  in shortcuts.

Backwards incompatible changes:
- Layout.width was renamed to preferred_width and now receives a
  max_available_width parameter.


0.42: 2015-06-25
----------------

Fixes:
- Support for Windows cmder and conemu consoles.
- Correct handling of unicode input and output on Windows.

New features:
- Support terminal titles.
- Handle Control-Enter as Meta-Enter on Windows.
- Control-Z key binding for Windows.
- Implemented alternate screen buffer on Windows.
- Clipboard became an ABC and InMemoryClipboard default implementation.


0.41: 2015-06-20
----------------

Fixes:
- Emacs Control-T key binding.
- Color fix for Windows consoles.

New features:
- Allow both booleans and Filters in many places.
- `password` can be a Filter now.


0.40: 2015-06-15
----------------

Fixes:
- Fix in output_screen_diff: reset correctly.
- Ignore flush errors in vt100_output.
- Implemented <num>gg Vi key binding.
- Bug fix in the renderer when the style changes.

New features:
- TokenListControl can now display the cursor somewhere.
- Added SwitchableValidator class.
- print_tokens function added.
- get_style argument for Application added.
- KeyBindingManager got an enable_all argument.

Backwards incompatible changes:
- history_search is now a SimpleFilter instance.


0.39: 2015-06-04
----------------

Fixes:
- Fixed layout.py example.
- Fixed eventloop for Python 64bit on Windows.
- Fix in history.
- Fix in key bindings.


0.38: 2015-05-31
----------------

New features:
- Improved performance significantly for processing key bindings.
  (Pasting text will be a lot faster.)
- Added 'M' Vi key binding.
- Added 'z-' and 'z+' and 'z-[Enter]' Vi keybindings.
- Correctly handle input and output encodings on Windows.

Bug fixes:
- Fix bug when completion cursor position is outside range of current text.
- Don't crash Control-D is pressed while waiting for ENTER press (in run_system_command.)
- On Ctrl-Z, don't suspend on Windows, where we don't have SIGTSTP.
- Ignore result when open_in_editor received a nonzero return code.
- Bug fix in displaying of menu meta information. Don't show 'None'.

Backwards incompatible changes:
- Refactoring of the I/O layer.  Separation of the CommandLineInterface
  and Application class.
- Renamed enable_system_prompt to enable_system_bindings.

0.37: 2015-05-11
----------------

New features:
- Handling of trailing input in contrib.regular_languages.

Bug fixes:
- Default message in shortcuts.get_input.
- Windows compatibility for contrib.telnet.
- OS X bugfix in contrib.telnet.

0.36: 2015-05-09
----------------

New features:
- Added get_prompt_tokens paramter to create_default_layout.
- Show prompt in bold by default.

Bug fixes:
- Correct cache invalidation of DefaultPrompt.
- Using text_type assertions in contrib.telnet.
- Removed contrib.shortcuts completely. (The .pyc files still
  appeared incorrectly in the wheel.)

0.35: 2015-05-07
----------------

New features:
- WORD parameter for WordCompleter.
- DefaultPrompt.from_message constructor.
- Added reactive.py for simple integer data binding.
- Implemented scroll_offset and scroll_beyond_bottom for Window.
- Some performance improvements.

Bug fixes:
- Handling of relative path in PathCompleter.
- unicode_literals for all examples.
- Visibility of bottom toolbar in create_default_layout shortcut.
- Correctly handle 'J' vi key binding.
- Fix in indent/unindent.
- Better Vi bindings in visual mode.

Backwards incompatible changes:
- Moved prompt_toolkit.contrib.shortcuts to prompt_toolkit.shortcuts.
- Refactoring of contrib.telnet.

0.34: 2015-04-26
----------------

Bug fixes:
- Correct display of multi width characters in completion menu.

Backwards incompatible changes:
- Renamed Buffer.add_to_history to Buffer.append_to_history.

0.33: 2015-04-25
----------------

Bug fixes:
- Crash fixed in SystemCompleter when some directiories didn't exist.
- Made text/cursor_position in Document more atomic.
- Fixed Char.__ne__, improves performance.
- Better performance of the filter module.
- Refactoring of the filter module.
- Bugfix in BufferControl, caching was not done correctly.
- fixed 'zz' Vi key binding.

New features:
- Do tilde expansion for system commands.
- Added ignore_case option for CommandLineInterface.

Backwards incompatible changes:
- complete_while_typing parameter has been moved from CommandLineInterface to
  Buffer.


0.32: 2015-04-22
----------------

New features:
- Implemented repeat arg for '{' and '}' vi key binding.
- Added autocorrection example.
- first experimental telnet interface added.
- Added contrib.validators.SentenceValidator.
- Added Layout.walk generator to traverse the layout.
- Improved 'L' and 'H' Vi key bindings.
- Implemented Vi 'zz' key binding.
- ValidationToolbar got a show_position parameter.
- When only width or hight are given for a float, the control is centered in
  the parent.
- Added beforeKeyPress and afterKeyPress events.
- Added HighlightMatchingBracketProcessor.
- SearchToolbar got a vi_mode option to show '?' and '/' instead of 'I-search'.
- Implemented vi '*' binding.
- Added onBufferChanged event to CommandLineInterface.
- Many performance improvements: some caching and not rendering after every
  single key stroke.
- Added ConditionalProcessor.
- Floating menus are now shown above the cursor, when below is not enough
  space, but above is enough space.
- Improved vi 'G' key binding.
- WindowRenderInfo got a full_height_visible, top_visible, and a few other
  attributes.
- PathCompleter got an expanduser option to do tilde expansion.

Fixed:
- Always insert indentation when pressing enter.
- vertical_srcoll should be an int instead of a float.
- Some bug fixes in renderer.Output.
- Pressing backspace in an empty search in Vi mode now goes back to navigation
  mode.
- Bug fix in TokenListControl (Correctly calculate hight for multiline
  content.)
- Only apply HighlightMatchingBracketProcessor when editing buffer.
- Ensure that floating layouts never go out of bounds.
- Home/End now go to the start and end of the line.
- Fixed vi 'c' key binding.
- Redraw the whole output when the style changes.
- Don't trigger onTextInsert when working_index doesn't change.
- Searching now wraps around the start/end of buffer/history.
- Don't go to the start of the line when moving forward in history.

Changes:
- Don't show directory/file/link in the meta information of PathCompleter anymore.
- Complete refactoring of the event loops.
- Refactoring of the Renderer and CommandLineInterface class.
- CommandLineInterface now accepts an optional Output argument.
- CommandLineInterface now accepts a use_alternate_screen parameter.
- Moved highlighting code for search/selection from BufferControl to processors.
- Completers are now always run asynchronously.
- Complete refactoring of the search. (Most responsibility move out of Buffer
  class. CommandLineInterface now got a search_state attribute.)

Backwards incompatible changes:
- get_input does now have a history attribute instead of history_filename.
- EOFError and KeyboardInterrupt is raised for abort and exit instead of custom
  exceptions.
- CommandLineInterface does no longer have a property 'is_reading_input'.
- filters.AlwaysOn/AlwaysOff have been renamed to Always/Never.
- AcceptAction has been moved from CommandLineInterface to Buffer. Now every
  buffer can define its own accept action.
- CommandLineInterface now expects an Eventloop instance in __init__.


0.31: 2015-01-30
----------------

Fixed:
- Bug in float positioning
- Show completion menu only for the default_buffer in get_input.

New features:
- PathCompleter got a get_paths parameter.
- PathCompleter sorts alphabetically.
- Added contrib.completers.SystemCompleter
- Completion got a get_display_meta parameter.


0.30: 2015-01-26
----------------

Fixed:
- Backward compatibility with django_extensions.
- Usage of alternate screen in the renderer.

New features:
- Vi '#' key binding.
- contrib.shortcuts.get_input got a get_bottom_toolbar_tokens argument.
- Separate key bindings for "open in editor." KeyBindingManager got a
  enable_open_in_editor argument.

0.28: 2015-01-25
----------------

Fixed:
- syntax error in 0.27

0.27: 2015-01-25
----------------

Backwards-incompatible changes:
- Complete refactoring of the layout system. (HSplit, VSplit, FloatContainer)
  as well as a list of controls (TokenListControl, BufferControl) in order to
  design much more complex layouts.
- ptpython code has been moved to a separate repository.

New features:
- prompt_toolkit.contrib.shortcuts.get_input has been extended.

Fixed:
- Behaviour of Control+left/right/up/down.
- Backspace in incremental search.
- Hide completion menu correctly when the cursor position changes.

0.26: 2015-01-08
----------------

Backwards-incompatible changes:
- Refactoring of the key input system. (The registry which contains the key
  bindings, the focus stack, key binding manager.) Overal much better API.
- Renamed `Line` to `Buffer`.

New features:
- Added filters as a way of disabling/enabling parts of the runtime according
  to certain conditions.
- Global clipboard, shared between all buffers.
- Added (experimental) "merge history" feature to ptpython.
- Added 'C-x r k' and 'C-x r y' emacs key bindings for cut and paste.
- Added g_, ge and gE vi key bindings.
- Added support for handling control + arrows keys.

Fixed:
- Correctly handle f1-f4 in rxvt-unicode.

0.25: 2014-12-11
----------------

Fixed:
- Package did not install on Python 2.6/2.7.

0.24: 2014-12-10
----------------

Backwards-incompatible changes:
- Completer.get_completions now gets a complete_event argument.

New features:
- For ptpython: filename completion inside Python strings.
- prompt_toolkit.contrib.regular_languages added.
- prompt_toolkit.contrib.pdb added. (Experimental PDB front-end.)
- Support for multiline toolbars.
- asyncio support added. (Integration with asyncio event loop.)
- WORD parameter added to Document.word_before_cursor.

Fixed:
- Small fixes in Win32 terminal output.
- Bug fix in parsing of CPR response.

0.23: 2014-11-28
----------------

New features:
- contrib.completers added.

Fixed:
- Improved j/k key bindings in Vi mode.
- Don't leak internal variables into ptipython shell.
- Initialize IPython extensions.
- Use IPython's prompt.
- Workarounds for Jedi crashes.

0.22: 2014-11-09
----------------

Fixed:
- Fixed missing import which caused Ctrl-Z to crash.
- Show error message for ptipython when IPython is not installed.

0.21: 2014-10-25
----------------
New features:
- Using entry_points in setup.py
- Experimental Win32 support added.

Fixed:
- Behaviour of 'r' and 'R' key bindings in Vi mode.
- Detect multiline correctly for ptpython when there are triple quoted strings.
- Some other small improvements.


0.20: 2014-10-04
----------------
Fixed:
- Workarounds for Jedi bugs.
- Better handling of window resize events.
- Fixed counter in ptipython prompt.
- Use IPythonInputSplitter.transform_cell for IPython syntax validation.
- Only insert newlines for open brackets if the cursor is at the end of the input string.

New features:
- More Vi key bindings: 'B', 'W', 'E', 'aW', 'aw' and 'iW'
- ControlZ now suspends the process


0.19: 2014-09-30
----------------
Fixed:
- Handle Jedi crashes.
- Autocompletion in `ptipython`
- Input validation in `ptipython`
- Execution of system commands (in `ptpython`) in Python 3
- Add current directory to sys.path for `ptpython`.
- Minimal jedi and six version in setup.py

New features
- Python 2.6 support
- C-C> and C-C< indent and unindent emacs key bindings.
- `ptpython` can now also run python scripts, so aliasing of `ptpython` as
  `python` will work better.

0.18: 2014-09-29
----------------
- First official (beta) release.


Jan 25, 2014
------------
first commit
