Open
Conversation
This aliases `:0` to `:1`.
Auto-abbreviation is enabled when the width is in the rante 1..10.
While format_expand_arg() can assume a variable is well formed, format_append_arg() should not. A command using '%(prompt' without closing parenthesis causes Tig to segfault. This is due to format_append_arg() which assumes the presence of a ')' char, resulting in the 'next' variable being 0x1 (NULL + 1). This patch checks for this case and return FALSE in consequence. In the meantime, constify variables in these two functions. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
argv: ensure closing parenthesis in variables
This allows to dump the current ncurses screen data to a file. The main use is for testing. The command optionally takes a file name.
The former allows to execute prompt scripts automatically on startup and the latter forces Tig to not render anything to the terminal.
This adds a small test framework and updates all existing tests to use it. Tests are now implemented using shell scripts and integration with the build output is much improved.
This also fixes the release script to correctly update the release title.
This also fixes the errors identified by the test.
This also fixes a segfault when TERM=dumb due to built-in line rules not being properly initialized.
This adds the possibility to configure tests via TEST_OPTS env variable which is used to control the indentation depending on whether showing verbose output or not.
When blaming a file with uncommitted changes, it is annoying that it is not possible to jump to the HEAD version from an uncommitted line. It turns out that the commit already has HEAD as its parent, so we simply need to relax the check in check_blame_commit() to allow the parent request to make it to blame_go_forward(). Signed-off-by: John Keeping <john@keeping.me.uk>
…t-committed blame: treat HEAD as the parent of not-committed-yet
Change code that updates the internal env/state variables to use string_ncopy instead of string_copy_rev, since the latter copies atmost 40 characters. Test that both branches and tags with long names can be succesfully checked out. Fixes jonas#290
This changes two 'commit date' to 'author date'. References jonas#294
Calling `:set vertical-split = no` will cause a reload so move the setting from the steps to the tigrc.
The watch code introduced a bug where stdin was marked with nodelay() when reading multibyte key input. This changed get_input() to use wtimeout() instead of nodelay(). Unfortunately, as a defensive measure an extra nodelay() was added before the loop that reads the remaining multibyte stream, which in turn broke readline support.
As a stop gap measure, the readline backend was by-passed during script execution. This changes the prompt code to allow scripts to interact with the readline code by decoding the symbolic keys and serving them to readline as bytes. Since the script executing is mainly targeting towards the test suite this will make it possible to test the readline backend. However, it does cause script behavior to act differently based on whether readline is supported or not.
The readline version of read_prompt() did not act the same way as the non-readline version. Add check to ensure that NULL is returned instead of the empty string. Fixes jonas#302
This addresses the following type warnings emitted by clang:
1) src/watch.c:192:2: warning: void function 'watch_apply' should not return void expression [-Wpedantic]
return watch_apply_changes(source, WATCH_EVENT_LOAD, changed);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2) include/tig/keys.h:57:6: warning: ISO C forbids forward references to 'enum' types [-Wpedantic]
enum status_code get_key_value(const char **name, struct key *key);
^
The warnings was emitted when executing the following command:
> make clean all CFLAGS="-Wpedantic -Wno-extra-semi -Wno-variadic-macros -Wno-gnu-empty-initializer"
Based on http://redsymbol.net/articles/unofficial-bash-strict-mode/ the strict mode makes the tests error out when a command exits with a non-zero code--even for commands part of a pipe. In addition errors are reported for references to undefined variables.
Dash doesn't support `set -o pipefail`.
This (should) fix the tree/default-test.
This allows a user to maintain half a window of context when paging through content (and allows for <Ctrl-u> and <Ctrl-d> behavior to match Vim's), but does not bind any keys to them by default. [ jf: add NEWS entry and tigrc stubs. ]
This changes how initialization so that no neutral view is opened and most importantly ensures that the initial view request is executed. Tests assuming they start in a neutral view can now ditch the initial `:view-*` command.
This also adds an additional check for the file filter.
The code that allows to jump to a line when opening a view from the command line (e.g. `tig +10`) conflicted with diff context restoring since it always restored using `view->env->lineno` regardless of whether it was the view's first rendering or not. Furthermore, since diff_select sets `view->env->lineno` this lead to strange line jumps. The bug is fixed by using `view->prev_pos` for implementing `+<lineno>` and ensuring that it only happens for the initial view rendering.
This reverts commit dcb19ec.
…fix."" This reverts commit 0817d77.
…ward sulfix.""" This reverts commit 861ab90.
…fix."" This reverts commit 0817d77.
…ward sulfix.""" This reverts commit f2ca09a.
… ago/forward sulfix."""" This reverts commit c275280.
… verbose ago/forward sulfix.""""" This reverts commit 9bd09ad.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.