0.11.0
Changes crossterm 0.11.0
As preparation for crossterm 0.1.0 we have moved crossterm to an organization called 'crossterm-rs'.
Code Quality
- Code Cleanup: warning-cleanup, crossterm_style-cleanup, crossterm_screen-cleanup, crossterm_terminal-cleanup, crossterm_utils-cleanup, 2018-cleanup, api-cleanup-1, api-cleanup-2, api-cleanup-3
- Examples: example-cleanup_1, example-cleanup_2, example-fix, commandbar-fix, snake-game-improved
- Fixed all broken tests and added tests
Important Changes
- Return written bytes: return-written-bytes
- Added derives:
DebugforObjectStyledebug-derive, Serialize/Deserialize for key events serde - Improved error handling:
- Return
crossterm::Resultfrom all api's: return_crossterm_resultTerminalCursor::pos()returnsResult<(u16, u16)>Terminal::size()returnsResult<(u16, u16)>TerminalCursor::move_*returnscrossterm::ResultExecutableCommand::queuereturnscrossterm::ResultQueueableCommand::queuereturnscrossterm::Resultget_available_color_countreturns no resultRawScreen::into_raw_modereturnscrossterm::Resultinstead ofio::ResultRawScreen::disable_raw_modereturnscrossterm::Resultinstead ofio::ResultAlternateScreen::to_alternatereturnscrossterm::Resultinstead ofio::ResultTerminalInput::read_linereturnscrossterm::Resultinstead ofio::ResultTerminalInput::read_charreturnscrossterm::Resultinstead ofio::Result- Maybe I forgot something, a lot of functions have changed
- Removed all unwraps/expects from library
- Return
- Added KeyEvent::Enter and KeyEvent::Tab: added-key-event-enter, added-key-event-tab
- Synced set/get terminal size behaviour: fixed-get-set-terminal-size
- Method renames:
AsyncReader::stop_reading()tostop()RawScreen::disable_raw_mode_on_droptokeep_raw_mode_on_dropTerminalCursor::reset_position()torestore_position()Command::get_anis_code()toansi_code()available_color_counttoavailable_color_count()Terminal::terminal_sizetoTerminal::sizeConsole::get_handletoConsole::handle
- All
i16values for indexing: set size, set cursor pos, scrolling synced tou16values - Command API takes mutable self instead of self