Handle all cursor positioning in get_input
Also fixes use of the C++ true keyword which crept in in commit
babaa6f7a97cbe3948588e5181de0801ce32b792 (Refactor user input handling
into separate function).
Also fixes use of the C++ true keyword which crept in in commit
babaa6f7a97cbe3948588e5181de0801ce32b792 (Refactor user input handling
into separate function).
Optimize drawing by updating the screen in one go
Switch to use wnoutrefresh everywhere and call doupdate in the get_input
loop. This allows multiple updates to be made while only one burst of
IO occurs.
Switch to use wnoutrefresh everywhere and call doupdate in the get_input
loop. This allows multiple updates to be made while only one burst of
IO occurs.
Abbreviate author names to initials when author-width < 6
Refactor author drawing into draw_author
Fix tokenizing when parsing ~/.tigrc
When moving to use argv_from_string() in set_option() a regression was
introduced causing problems with parsing of multiple spaces between
arguments. For example:
color date yellow default
Reported by Clifford Caoile.
When moving to use argv_from_string() in set_option() a regression was
introduced causing problems with parsing of multiple spaces between
arguments. For example:
color date yellow default
Reported by Clifford Caoile.
Workaround bug exposed by the redrawwin removal in do_scroll_view
The bug means that the message from scrolling up one line when
impossible followed by scrolling down one line is not removed by the
next action.
Workaround this by inserting an extra call to report("") before the call
to wrefresh().
The bug means that the message from scrolling up one line when
impossible followed by scrolling down one line is not removed by the
next action.
Workaround this by inserting an extra call to report("") before the call
to wrefresh().
Make cursor updating when resizing the display and loading a view
Change scrollok strategy to leave it off unless when calling wscrl
Should lead to fewer calls.
Should lead to fewer calls.
Initialize status_empty flag to FALSE
Fixes cursor restoring when loading the status view at startup.
Fixes cursor restoring when loading the status view at startup.
Eliminate unneeded calls to redrawwin
This optimize the view drawing especially when scrolling/moving down the
main view with the diff view open. Should make browsing more bareable
over slow links.
This optimize the view drawing especially when scrolling/moving down the
main view with the diff view open. Should make browsing more bareable
over slow links.
TODO: a small commit cache should be employed at some point
Help view: show the action name similar as in Mutt's help view
Remove preallocation of view lines in help_open
corrected doubly used ID view-manipulation in manual.txt
Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tigrc(5) & manual: move view specific actions out of the misc group
Add support for loading blame for parent commits
Requested by Jeff King in <20080410040213.GA29618@sigill.intra.peff.net>
Requested by Jeff King in <20080410040213.GA29618@sigill.intra.peff.net>
Refactor prompting for user input
Rename tree-parent action to parent
Minor cleanup of the tree view code; fix enter on the first line
TODO: remove resolved item
Tree view: improve to look less like plumbing
It is now more like `ls` by annotating the output of ls-tree with commit
information.
It is now more like `ls` by annotating the output of ls-tree with commit
information.
Refactor main_read to create parse_author_line
update_view: remove an unneeded goto
Fix floating point bug in the blame reporting
Also call end_update for views with custom open function
Broken by 49dc4030694e22b7f141bfb13565783985c48b77
Broken by 49dc4030694e22b7f141bfb13565783985c48b77
Add -O0 to the debug flags
Rectify arg indexes changes in blame --no-color fix
Introduced in 78685441f4effd81082a53abb4c1246ebd1e0e49
Introduced in 78685441f4effd81082a53abb4c1246ebd1e0e49
Fix status loading of unmerged entries to avoid access to freed memory
Fix kill_io() to only call kill(2) when pid is non-zero
Blame view: fix reloading of the diff view for changes not yet committed
The regression was introduced in e00ea5d (Blame: do to not reload the
diff view for same commits).
The regression was introduced in e00ea5d (Blame: do to not reload the
diff view for same commits).
Oops, always specify --no-color when using git diff
Blame view: fix diffing of lines marked as not yet committed
Add support for restoring the view position in reloadable views
The status view still uses its own more specialized restoring code.
There are still some cases which are not completely handled. For
example, restoring will only be done when the current line is the first
in the view, thus changing the view position will cancel the restoring.
However, if you change back to the first line restoring will be enabled.
The status view still uses its own more specialized restoring code.
There are still some cases which are not completely handled. For
example, restoring will only be done when the current line is the first
in the view, thus changing the view position will cancel the restoring.
However, if you change back to the first line restoring will be enabled.
Fix status_exists to be consistent with data displayed in the stage view
Make it possible to call select_view_line for non-displayed views
Refactor find_next_line into select_view_line
Refactor user input handling into separate function
Fixes resizing while the prompt is open.
Fixes resizing while the prompt is open.
Add support for opening any blob in an editor
Prefer werase to wclear when possible to reduce flickering
Use werase instead of wclear in redraw_view and optionally make
redraw_display use wclear before calling redraw_view. After this, wclear
is only used when there is possibility that the screen could have been
corrupted.
Use werase instead of wclear in redraw_view and optionally make
redraw_display use wclear before calling redraw_view. After this, wclear
is only used when there is possibility that the screen could have been
corrupted.
Cleanup and improve option toggling actions to include help message
Fix stage reloading to not close when staging chunks from group diff
Do not terminate the update when switching back to a loading view
Move call to end_update() to begin_update() so checks for view content
is honored in the case where no reloading is necessary.
Move call to end_update() to begin_update() so checks for view content
is honored in the case where no reloading is necessary.
Fix regression of main view drawing
Hopefully last fix for dirty flag regressions.
Hopefully last fix for dirty flag regressions.
Cleanup update_view's read loop
Fix regression in handling of data for non-UTF-8 locales
The bug was introduced in 65498141015b6070cf5c9b5704039389dba76e90 where
the the IO API was changed from using stdio to 'raw' file descriptors.
Part of the change removed the need for cutting the ending newline from
the input line in update_view(). This caused the resulting iconv output
buffer to not be NUL terminated since the input string no longer
contained an ending NULL byte.
Reported by Pavel Roskin.
The bug was introduced in 65498141015b6070cf5c9b5704039389dba76e90 where
the the IO API was changed from using stdio to 'raw' file descriptors.
Part of the change removed the need for cutting the ending newline from
the input line in update_view(). This caused the resulting iconv output
buffer to not be NUL terminated since the input string no longer
contained an ending NULL byte.
Reported by Pavel Roskin.
Fix another regression from the dirty flag changes causing flickering
Use redraw_view_from() instead of redraw_view() to avoid excessive calls
to wclear().
Use redraw_view_from() instead of redraw_view() to avoid excessive calls
to wclear().
Fix serious bug where a stack allocated variable was returned
Reproducable when calling tig with log arguments.
Reproducable when calling tig with log arguments.
Improve messages when preparing to load blame commits
Fix regressions introduced in the last few dirty flag changes
Regressions was introduced in ddc5064c42f2adab639feeacf86729a44f06f216.
Regressions was introduced in ddc5064c42f2adab639feeacf86729a44f06f216.
Tree view: make drawing more smooth by using the dirty flag
Cleanup redrawing of views when updating by using the dirty flag
Cleanup the tree_read sorting loop
Fix memory corruption bug in tree_read when sorting the entries
Triggered by defining ITEM_CHUNK_SIZE to 1.
Triggered by defining ITEM_CHUNK_SIZE to 1.
Cleanup and simplify the code by introducing add_line_format
Cleanup the code by calling realloc_lines in add_line_data
tig-0.13
Launch mergetool from the project root directory
Fixes problem when in a subdirectory.
Fixes problem when in a subdirectory.
Clear the view after 1 second during updates where reading takes long
Inspired by Karl Chen.
Inspired by Karl Chen.
IO API: use select(2) to check if pipe is readable when updating a view
IO API: reindent status_run main loop after the rewrite
No code change.
No code change.
IO API: replace io_gets with helper for scanning buffers
Use in status_run() to simplify the code.
Use in status_run() to simplify the code.
IO API: use fork+exec
IO API: use argv internally
IO API: use file descriptor internally
IO API: replace init_io_fd with io_open which calls fopen(3)
IO API: use in the status view
IO API: use when loading repository properties
This introduces an incompatibility regarding the format of the
TIG_LS_REMOTE environment variable.
This introduces an incompatibility regarding the format of the
TIG_LS_REMOTE environment variable.
IO API: use in the stage view
IO API: obsolete opt_pipe
IO API: obsolete opt_cmd by using prepare_update in status_enter
IO API: use prepare_update when parsing command line arguments
IO API: use in add_describe_ref
IO API: use in the blame view
IO API: unify tree view and the default path in begin_update
IO API: use for the main, log, diff, tree and blob views
This introduces an incompatibility with previous versions.
This introduces an incompatibility with previous versions.
IO API: use when preparing to run commands from the prompt
IO API: convert status checkout/revert support
IO API: use when running external commands
IO API: refactor the run request command formatter
Adds support for new %(file), %(directory) and %(ref) identifiers.
Also adds infrastructure for working with argument arrays
Adds support for new %(file), %(directory) and %(ref) identifiers.
Also adds infrastructure for working with argument arrays
IO API: add small library for reading files and running programs
Blame: do to not reload the diff view for same commits
Blame: update blame to selected commit when pressing 'B'
Blame: remove unused member of struct blame
Add setup_update for initialize incremental view updates
Refactors common parts of begin_update and blame_open.
Refactors common parts of begin_update and blame_open.
Slightly reduce memory usage for keybindings
Move formatting of blame --incremental command to blame_read_file
Doing it in blame_open after starting the command makes error handling
harder and the code was indeed buggy.
Doing it in blame_open after starting the command makes error handling
harder and the code was indeed buggy.
Minor simplification of blame_open
Don't use view->cmd to share state in the blame view
Fix drawing loading views that are not displayed.
Add support for launching the editor from the tree view
Only supported for files in the currently checked out head.
Requested by Cyril Romain.
Only supported for files in the currently checked out head.
Requested by Cyril Romain.
Replace opt_no_head with opt_head_rev in order to save the HEAD rev
Add is_initial_commit macro which replaces opt_no_head tests. Also,
update ref_head and ref_commit with the resolved HEAD revision.
Add is_initial_commit macro which replaces opt_no_head tests. Also,
update ref_head and ref_commit with the resolved HEAD revision.
Use switch statement in tree_request
Refuse to open blame view for all non-file entries in the tree view
Refuse to open deleted files from the status and stage views
tigrc(5): minor fixes and improvements from wip/run-command
Refuse to open a directory in the status and stage view
Adds suffixcmp() used for checking if the status entry name ends
with "/". Also use it for repository reference loading.
Adds suffixcmp() used for checking if the status entry name ends
with "/". Also use it for repository reference loading.
Fix waiting for input after executing a run request in pager mode
When in pager mode, stdin should not be touched. After executing a run
request a getc(stdin) was done to wait for the user's command to
continue, which didn't result in the expected behavior. To fix this
store the proper TTY handle in the new opt_tty variable which is set up
by init_display().
When in pager mode, stdin should not be touched. After executing a run
request a getc(stdin) was done to wait for the user's command to
continue, which didn't result in the expected behavior. To fix this
store the proper TTY handle in the new opt_tty variable which is set up
by init_display().
update_view: Check the pipes and call end_update() before redrawing
This allows the main view to finish its updating of the revision graph
so that it is rendered properly for the last commit. As a bonus, it also
removes a goto.
This allows the main view to finish its updating of the revision graph
so that it is rendered properly for the last commit. As a bonus, it also
removes a goto.
Use "--" to separate file argument to git-checkout
Cleanup and fix the main loop to make view point to the current view