This file documents all changes made to the project and is updated before each release.
- #133: Updated the
flake.nix
file. - #136: Fixed weird drawing issues when minus is ran multiple times in a row.
- #134: Improve documentation for
error
andinput
modules.
- cd2b92: Fixed bug where screen jumps to 2nd match when first match is present on the same line where upper mark is present
- #120, #121: Fixed screen flickering on WSL/Windows Terminal
- 3493e76d: Fixed weird search jumps due to updating upper_mark in incremental search
- Include a bunch of changes targeting text appending.
- Introduced
minus_core::utils::digits
which uses faster algorithm to calculate digits in line numbers - 67772fc: Improve performance by Only reformatting the entire text when linen numbers are turned on
- Introduce caching for frequently used analysis about the data like like total line count, total row count, length of the longest line etc
- #117, #118, #123, #124, #132: improvements to documentation in README and lib.rs
- 53922d348: Overhaul docs for input module
- #114: Added follow mode
- #65: Implement horizontal scrolling
- #130: Added new APIs to the screen module.
- 36da3ca6: Added
add_key_events_checked
andadd_mouse_events_checked
functions inHashedEventRegister
to prevent accidentally overriding already present bindings. - #112: Added all the dependencies required to develop minus in the
flake.nix
file.
- Removed the
initial_formatted_lines
andinitial_upper_mark
fields fromIncrementalSearchOpts
- #130: Merge the text module with screen module.
- cb991f1ac8: Use a better colorscheme for the prompt
- 4611a13: Use a Vec style type for
lines_to_row_map
field inPagerState
which yields better performance
- Version information in README
- Static mode specific functionality not working due to incorrect placing of
RUNMODE
setting code. (#110)
- Prompt status not being updated when a new search is activated. (#102)
- Improved consistency of search highlighting.
- Fix a panic when using
delete
key when defining keybindings using the new input mapping method. - Fix a bug where search character shown at prompt is
/
regardless of search direction.
- Added
Pager::show_prompt()
function to control whether to show prompt. - Introudce s
state::SearchState
type to hold data specific to seaching only. - Added a
PagerState::search_state
field to get theSearchState
field. - Introduce a feature to disable minus's method of search highlighting and get exact/accurate highlighting of the search matches.
- Added incremental searching support
- Introduced more keybindings on the search prompt. (#104)
- Added a
Pager::set_incremental_search_condition
function to set condition for running incremental search. - Introduce
SearchOpts
andIncrementalSearchOpts
types so that applications can control when to run incremental search. - Added an experimental
screen
module andScreen
type to get analysis of the data present in minus.
- Make the
state
module public. - Make the
search
module public. - Rename
events
module tocommands
- Changed the name of
Event
enum toCommand
- Moved the
PagerState::lines
andPagerState::formatted_lines
fields into theScreen
type. - Make the
RunMode
type public.
InputEvent::NextMatch
has been deprecated in favour ofInputEvent::MoveToNextMatch
InputEvent::PrevMatch
has been deprecated in favour ofInputEvent::MoveToPrevMatch
PagerState::search_mode
hhas been deprecated in favour ofSearchState::search_mode
- Remove
futures-lite
from dependencies.
- Unexpected line break where number of digits in line number increase (#66)
- Pressing
[n]G
takes to nth row on screen rather than the nth line in the actual text (#99)
HashedInputRegister::default()
now inserts the default bindings before returning theHashedInputRegister
. This better aligns with the docs.- Massively simplify all the text-related functions and add better docs to all of them. (#97)
HashedInputRegister::new()
is now publicly available- Added
HashedInputRegister::with_default_hasher()
to create aHashedInputRegister
with the default hasher. - Added a
Dockerfile
to build/test minus in isolated environment.
- Passing
false
to PagerState::set_run_no_overflow() causes a full pager to start where in reality passingtrue
should lead to this action. (#94) - If a full pager isn't started in static output mode and another pager
is started after the first one, minus would make a panic as the
RUNMODE
variable doesn't get reset. This patch also fixes this bug. (#94)
- Add a new native API for defining key/mouse bindings (#93)
- Fixed a bug where screen would get broken if user scrolls with the mouse while simultaneously data in also being inserted onto the screen (#92)
- Removed dependency from crossbeam-utils
- Fixed bug where copy pasting the default
DefaultInputClassifier
template causes a compile error(#90) - Fixed clippy warnings
- Added
AppendStyle
andAppendProps
enums in the newminus_core::utils::text
to control the append behaviour and properties related to each append operation
- Moved
make_append_str
function and related tests into newminus_core::utils::text
module - Bumped MSRV to Rust 1.67
- Fixed a bug where line number paddings didn't update properly when their number of digits changed.
- Fixed bug where screen would get redrawn after processing exit callbacks
- Added new events to jump to next or previous nth search result.
In the default keybindings these are mapped as:-
- '10n' would go forward to the 10th search result from the current position
- '10p' would go backward to the 10th search result from the current position
- Draw the screen intelligently. On movement, minus now redraws only those lines of the screen that need to be updated rather than redrawing the entire screen. (#84)
parking_lot
has been added as a dependency and all sync locks from std have been migrated toparking_lot
's types'
- Fixed regression while quitting in static paging (#79)
- Fixed a bug where the screen would get redrawn after quitting in dynamic paging (#79)
- Fined bug where
dynamic_paging()
andpage_all()
functions can't be used multiple times. (#88)
- Removed all usages of
NextMatch
and 'PrevMatch'. These types may be removed in future major releases
- Fixed regression in quitting in v5.0.4 and cleanup issues from v5.0.0 (#79)
- Added dependency on crossbeam-utils. This allows us to use scoped threads feature provided by it.
- A custom panic hook has been injected to display panic messages more clearly when a panic happens (#77)
- minus now displays the name of the binary in the prompt rather than the just the text
minus
- Improved the crate level documentation including fix for not displaying the optional
[n]
prefix for movement keys
- Fix line numbers not wrapping properly in some cases of wrapping.
- Fix search bug where the highlighted line is off by one
- The README now displays the optional number prefix before all movement keys
- The prompt line now shows the number of search matches found and the current search match number which is in focus
-
Line Numbers are displayed only on the first wrapped row of each line.
This decreases the clutter on the line number column especially on text which span multiple lines.
-
Line Numbers are now padded by about 5 spaces. This makes the line numbers not get tightly packed with the left edge of the terminal.
-
Fixed bug when appending complex sets of text, a wrong value of
unterminated
got calculated which caused junk text to appended to thePagerState::formatted_lines
and also to be displayed on the terminal. -
Fixed mouse scroll wheel not scrolling through the screen.
This occurred because a of a previous patch which removed the line that enabled the mouse events to be captured.
-
Fix panic when the search term gets changed
This occurred due to the
search_idx
not being repopulated when a new search is activated.
- Fixed extremely high CPU usage while running caused due to calling
Receiver::try_recv()
rather thanReceiver::recv()
(#60) - Fixed another performance bug which was due to calling
event::poll
every 10ms. The poll duration was increased to 100ms without any loss of responsiveness (9f7dace34) - Changed initialization of some fields in
PagerState
tp preallocate memory for them. This reduces the number of allocations that need to be made when the pager just starts. - Bring back and improve the
Justfile
- Fix bugs related to duplicate line numbering and wrong search lines to be matched (#62)
-
Added
dynamic_paging
function to enable asynchronous paging.This is the unification of the previous
tokio_lib
andasync_std_lib
features. minus no longer depends ontokio
orasync_std
directly and requires end-application to bring in these libs as dependency. This makes minus completely runtime agnostic -
minus can now be called from a OS thread using
threads
. See example in README -
Applications should call
dynamic_paging
on s separate non-blocking thread liketokio::task::spawn_blocking()
orthreads
. -
Use channels for communication
- This allows minus to exactly know when data is changed and do various optimizations on it's
- Added
crossbeam_channels
as dependency.
-
Store the current run mode as static value
- The
RUNMODE
static item tells minus whether it is running in static mode or asynchronous mode - Added
once_cell
as a dependency to store the above value in static scope.
- The
-
Added feature to scroll through more than one line
- Prefixing any of the movement keys with a number will move the screen up or down to that many lines.
For example
10j
will take the view 10 lines down. - Similarly jump to specific line by prefixing
G
with a number. For example15G
will take you to the 15th line of the data.
- Prefixing any of the movement keys with a number will move the screen up or down to that many lines.
For example
-
Searching through text with lots of ansi sequence inside it will no longer break the search Previously this case would cause the search matcher to not match it and move to the next one (#57)
-
Added a
PagerState
struct to store and share internal data. It is made public, along with some of its fields so that it can be used to implementInputClassifier
trait for applications that want to modify the default keybindings -
Renamed
AlternatePagingError
toMinusError
. This was to shorten the number of letters one needs to type -
Pager::set_run_no_overflow(bool)
function is now only available instatic_output
mode. In dynamic mode, this was more of a wasted feature as it didn't solve the issue that it should have done and was a burden to maintain it. -
Changed function signature of
InputClassifier::handle_input
tohandle_input(&self, ev: Event, ps: PagerState) -> Some(InputEvent)
. Thehandle_input()
function cared about a lot of things and passing everything as a parameter was really tedious. This also caused a breaking change whenever a new parameter was added -
Changed function signature of
Pager::new
tonew() -> Pager
. It previously used to return a
Result<Pager, TermError>
. -
Use threads even in static paging mode. Although mutating the
Pager
s data won't reflect any changes in
static mode. -
Replaced
tokio-no-overflow
example withstatic-no-overflow
function. This is because thePager::run_no_overflow
function is only available instatic_output
feature. -
All implemented functions on
Pager
exceptPager::new
will return aResult<(), MinusError>
because the communication with the pager may fail if the pager has quit early on. -
Applications should spawn
dynamic_paging
by themselves. For example on tokio, this would beuse tokio::{task::spawn_blocking, join} use minus::{Pager, dynamic_paging}; let pager = Pager::new(); join!( spawn_blocking(move || dynamic_paging(pager) // .... );
-
Renamed
Pager::set_input_handler
toPager::set_input_classifier
. -
Removed
tokio_updating
andasync_std_updating
in favour of the unifieddynamic_paging
function. -
Removed
PagerMutex
type. -
Removed
tokio
,async-std
andasync-mutex
from dependencies. -
Removed
Pager::finish
function. -
Removed
Pager::end_data_stream
function.This was only required for running in dynamic mode with run no overflow on. With deprecation of this feature we no longer need this function
-
Removed
static_long
example. -
Removed
PageAllError
fromstatic_pager
anderrors
modules.
- Fix all clippy warnings
- Fixed a bug where
q
key didn't quit the pager inPagerQuit
exit strategy (#56)
- Introduce a bunch of performance improvements
- Added the
minus
logo in README
- Fixed panic when more than 65,535 lines were searched at once
- Fixed bug where selecting with mouse didn't select anything on the output
- Introduced robust line wrappings using the textwrap crate
- Added a
Pager::send_message
function to send messages at the prompt site - Added
Space
andEnter
keybindings - The docs now show feature tags on items that are gated on features
- The
Pager::set_prompt
function now panics if it contains a line with \n characters - Added a Code of Conduct
- Implemented the
std::fmt::Write
trait directly onPager
- Add new examples 3 new examples:- color_output, msg-tokio, tokio-no-overflow
- Expanded the test suite of minus
-
The
Pager::set_page_if_havent_overflowed
has been replaced withPager::set_run_no_overflow
-
The
Pager::set_data_finished
has been replaced withPager::end_data_stream
-
All fields inside the pager are now private and cannot be accessed or directly written to
-
All tests now run without requiring
--all-features
-
The
Pager::new
function now returns aResult<Pager, TermError>
-
The Pager API has changed from a builder pattern to a more programmatic pattern like
use minus::Pager; let mut pager = Pager::new().unwrap(); pager.set_prompt("Example")
-
Line Numbers displayed are now bold and have a little more left padding
-
Next and Previous now simply move the display to the match line number rather than moving the cursor
-
The
utils
module file has have been transformed into a directory with it's own separate
-
Prevent panic if invalid regex is given during search
-
Fix run_no_overflow for static pager (#43)
Previously, this setting had no effect if paging static output, due to an if condition in
static_pager.rs
which did not consider the setting. This commit makes this setting behave as expected. (@tomstoneham) -
The cursor is hidden as soon as the search query entry is complete.
-
Fix where color outputs get distorted after search matches
- u and d keys for half page scrolling
- The reverse direction of j and k keys
- Fixed warnings issued by clippy
- Add docs for InputHandler and DefaultInputHandler
- Documentation build failure
- A trait to coustomize the default keybindings
- Fixed bug where cursor movement stops at last search instance
- A new function to signal the end of data to the pager
- Page cleanup when the pager needs to quit
- Fixed bug where text with large amount of lines where not displayed
- Fixed bug last line of text was not displayed when the string is pushed with multiple lines
- Added information about the backward search feature in README
- Removed the unstable
spin\_loop
function
- Backward searching
- Fix bug where cursor is placed in wrong position if upper_mark is not 1
- If two consecutive searches are done in a single session, the previous search highlghts are not removed
- If the same search query is called twice, the matches are repeated
- Add info about
search
feature - Add info about
searchable
field andset_searchable
soft-deprecation
- Fix README examples
- A special mutex for the Pager that is runtime-agnostic and implements
Send
+Sync
- Search using the
/
keyn
andp
to go to the next/previous match respectively
- Simplification how text is output to the screen when the terminal is not filled
- Ability to control the exit strategy
- Minimum requirement for tokio is tokio 1.0
- Fix docs where features are shown to enabled even when they are disabled by default
- Change version in README
-
New keybindings
j
for going up andk
for going downPage Up
andPage Down
for scrolling by entire pagesG
for going to the end andg
for going at the very top
-
Scrolling using mouse
-
Add a
less
like program as an example -
Add a complete line numbering system
-
A
Pager
struct for configuration with builder pattern configuration functions -
A new type
PagerMutex
which is just an alias forArc<Mutex<Pager>>
-
Error handling/propagating using
thiserror
tokio_updaring
andasync_std_updating
now take aPagerMutex
page_all
now takes aPager
instead of String
- Fix compilation errors
- Fix bug where
minus
does not redraw with terminal resize
- Added all features
- Fixed all bugs