Also unify ctrl-c behavior as cancel for python input and log windows.
Pressing ctrl-c in the python input will:
- NEW: If text is highlighted, copy that text to the clipboard.
- If no selection, clear the input.
- If no text is entered, try canceling the last running command.
Pressing ctrl-c in the log window will:
- NEW: Clear any active log selection
- NEW: Close the search bar (was Ctrl-l)
Manual Tests: Copy Paste + Log Pane Search and Filtering
Change-Id: I663eede9b25d2836b99a5e6e0aa255407d8230f9
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/87080
Reviewed-by: Chad Norvell <chadnorvell@google.com>
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
Rename `line_index` variables and functions in log_view.py to
`log_index`. They are indexes of log messages in the LogStore;
not indexes of screen lines.
Bugfix: LogView clear history was not honored in the LogScreen class.
Change-Id: Ie050cc0e70faa7fdd897b53d44e4cb0f558e4156
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/82183
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
- Rewrite all log line rendering
- Supports displaying log lines that have line breaks
- Impemented word wrapping
- User initiated scrolling is done on a subline basis
- Log line follow mode will jump to the bottom of each new message so
the whole log is displayed; just like on a standard terminal.
- Conditional rendering, logs are only re-rendered if needed. New lines
are added incrementally instead of whole screen redraws.
- Horizontal scrolling left and right (when line wrapping is off) is
not implemented. Those key bindings were removed for now.
Other changes:
- Default UI color changes: brighten the default foreground color and
the selected log line.
- Menu option to hide date from log table view
- Allow hiding window plugins on startup
- Disable line wrap indentation size calculations
Manual test steps:
- All LogPane Basic Actions
- All LogPane Search and Filtering
Change-Id: Ifd9a82600b2e4a2463bf26a91091ad77cddfd917
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/81340
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
- File > Open Logger menu that displays all known python loggers.
Clicking one opens a new log window with that logger.
- File > Log Table View > Show Python File and Logger options.
These preferences toggle displaying each log line's
Python logger and file:linenumber columns in table view.
- Set logging.lastResort to a file handler. This prevent loggers
with no handlers from outputting text to stderr and corrupting
the prompt_toolkit UI.
Change-Id: I6f36384764621b0f62ad6c51687b5b125c91da44
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/69280
Reviewed-by: Joe Ethier <jethier@google.com>
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>