Code

tig.git
15 years agoIgnore broken pipe signals
Jonas Fonseca [Tue, 10 Feb 2009 11:02:42 +0000 (12:02 +0100)]
Ignore broken pipe signals

Can be caused if a forked git process exits with an error. Tig should
detect this by checking the exit code of the child using the return
value done_io().

15 years agoUse putenv instead of setenv
Jonas Fonseca [Tue, 10 Feb 2009 10:50:59 +0000 (11:50 +0100)]
Use putenv instead of setenv

Not all platforms (e.g. Solaris) provide setenv. Based on patch by
SungHyun Nam.

15 years agomanual: Correct the keys to move the cursor one line up/down
Carsten Brockmann [Mon, 9 Feb 2009 19:04:23 +0000 (19:04 +0000)]
manual: Correct the keys to move the cursor one line up/down

Signed-off-by: Carsten Brockmann <cabro@gmx.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agoStatus view: upon failure to open a file show error message
Jonas Fonseca [Mon, 9 Feb 2009 03:04:40 +0000 (04:04 +0100)]
Status view: upon failure to open a file show error message

15 years agoRefactor and share view maximization code from view-close handling
Jonas Fonseca [Mon, 9 Feb 2009 03:02:33 +0000 (04:02 +0100)]
Refactor and share view maximization code from view-close handling

15 years agoFix io_strerror return type
Jonas Fonseca [Mon, 9 Feb 2009 03:01:48 +0000 (04:01 +0100)]
Fix io_strerror return type

15 years agoAdd support for handling core.worktree
Jonas Fonseca [Mon, 9 Feb 2009 00:55:40 +0000 (01:55 +0100)]
Add support for handling core.worktree

If this option is found set up GIT_DIR and GIT_WORK_TREE. Also, pass
the known git directory path to git ls-remote.

Requested-by: bill lam
15 years agoOptimize read_repo_config_option to reduce string comparisons
Jonas Fonseca [Mon, 9 Feb 2009 00:54:41 +0000 (01:54 +0100)]
Optimize read_repo_config_option to reduce string comparisons

15 years agoMove setting of remote branch from repo config to separate function
Jonas Fonseca [Mon, 9 Feb 2009 00:49:32 +0000 (01:49 +0100)]
Move setting of remote branch from repo config to separate function

15 years agoMark enum_maps and other data tables as const
Jonas Fonseca [Sun, 8 Feb 2009 19:37:11 +0000 (20:37 +0100)]
Mark enum_maps and other data tables as const

15 years agoUse check_blame_commit when handling REQ_ENTER
Jonas Fonseca [Sun, 8 Feb 2009 19:36:28 +0000 (20:36 +0100)]
Use check_blame_commit when handling REQ_ENTER

15 years agoNEWS: Mention Jeff's uninitialized variable bug fix
Jonas Fonseca [Sun, 8 Feb 2009 19:35:14 +0000 (20:35 +0100)]
NEWS: Mention Jeff's uninitialized variable bug fix

From commit 2677b744313c939890a8f6b3316f9d5452581ab8.

15 years agoHandle blaming beyond the creation of file more gracefully
Jeff King [Sun, 8 Feb 2009 11:00:42 +0000 (06:00 -0500)]
Handle blaming beyond the creation of file more gracefully

Currently when you ask to re-blame from the parent of a
commit that created the file, blame_read_file will complain
that it cannot get the file contents ("No blame exist").

At the time we try to read the file, it is too late to abort
the operation, as we have already changed to the new blame
view. However, we can detect this situation early by
limiting the selection of the parent revision to the
particular path of interest: if it returns a parent even
with path-limiting, then we know the path exists; if not,
then we know it doesn't.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agoBlame view: add guesstimation of line number when blaming parent commit
Jonas Fonseca [Sat, 7 Feb 2009 15:22:56 +0000 (16:22 +0100)]
Blame view: add guesstimation of line number when blaming parent commit

... by looking through the commit's diff for the hunk which introduced
the line. Also, try to set the filename properly.

15 years agoUse file and line number information when loading blame for commit
Jonas Fonseca [Sat, 7 Feb 2009 13:57:58 +0000 (14:57 +0100)]
Use file and line number information when loading blame for commit

This was developed in parallel and is very similar to patch posted by
Jeff King, however, with different goals in mind.

Message-Id: <20090207112613.GA18079@coredump.intra.peff.net>

15 years agoMake the blame view expand tabs at drawing time
Jonas Fonseca [Sat, 7 Feb 2009 15:22:27 +0000 (16:22 +0100)]
Make the blame view expand tabs at drawing time

15 years agoIntroduce common view position update helper
Jonas Fonseca [Sat, 7 Feb 2009 20:21:43 +0000 (21:21 +0100)]
Introduce common view position update helper

So jumping to search results and line numbers will work more uniform.

15 years agoImprove restoring of the view position to bound the offset
Jonas Fonseca [Sat, 7 Feb 2009 15:25:54 +0000 (16:25 +0100)]
Improve restoring of the view position to bound the offset

15 years agoJump to line when a number is entered in the prompt
Jonas Fonseca [Sat, 7 Feb 2009 14:20:57 +0000 (15:20 +0100)]
Jump to line when a number is entered in the prompt

15 years agoWarn users about integers in ~/.tigrc being out of bound
Jonas Fonseca [Sat, 7 Feb 2009 14:19:19 +0000 (15:19 +0100)]
Warn users about integers in ~/.tigrc being out of bound

15 years agoFix uninitialized variable in string_expand_length
Jeff King [Sat, 7 Feb 2009 10:37:23 +0000 (05:37 -0500)]
Fix uninitialized variable in string_expand_length

This led to totally unpredictable results from the function. The style
matches the loop in string_expand.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agoAdd support for 256 colors by allowing "colorN" names similar to Mutt
Witold Filipczyk [Sat, 7 Feb 2009 00:16:35 +0000 (01:16 +0100)]
Add support for 256 colors by allowing "colorN" names similar to Mutt

Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agoImprove on branch information in the status view
Jonas Fonseca [Thu, 5 Feb 2009 13:09:46 +0000 (14:09 +0100)]
Improve on branch information in the status view

The file checks was inspired by the prompt code from the git bash
completion script.

15 years agoSimplify setting the default for the system configuration file
Jonas Fonseca [Thu, 5 Feb 2009 17:38:47 +0000 (18:38 +0100)]
Simplify setting the default for the system configuration file

15 years agoRefactor and unify timezone parsing
Jonas Fonseca [Wed, 4 Feb 2009 16:10:04 +0000 (17:10 +0100)]
Refactor and unify timezone parsing

15 years agoRemove the need for the OPEN_NOMAXIMIZE flag
Jonas Fonseca [Wed, 4 Feb 2009 13:59:55 +0000 (14:59 +0100)]
Remove the need for the OPEN_NOMAXIMIZE flag

It was only used for the status view together with the OPEN_RELOAD flag.
However, since reloading and refreshing is the same for the status use
OPEN_REFRESH instead.

15 years agoRemove unused OPEN_BACKGROUNDED flag
Jonas Fonseca [Wed, 4 Feb 2009 13:35:44 +0000 (14:35 +0100)]
Remove unused OPEN_BACKGROUNDED flag

15 years agoUse enum_map for handling obsolete color names
Jonas Fonseca [Wed, 4 Feb 2009 13:25:29 +0000 (14:25 +0100)]
Use enum_map for handling obsolete color names

15 years agoUse enum_map for handling obsolete request names
Jonas Fonseca [Wed, 4 Feb 2009 13:25:06 +0000 (14:25 +0100)]
Use enum_map for handling obsolete request names

15 years agoRefactor the int_map interface into new enum_map interface
Jonas Fonseca [Wed, 4 Feb 2009 13:23:10 +0000 (14:23 +0100)]
Refactor the int_map interface into new enum_map interface

Renames int_map to enum_map and set_from_int_map to map_enum, which
now uses string_enum_compare instead of strncasecmp.

15 years agoCleanup and simplify option file parsing
Jonas Fonseca [Wed, 4 Feb 2009 08:29:49 +0000 (09:29 +0100)]
Cleanup and simplify option file parsing

15 years agotig-0.14
Jonas Fonseca [Thu, 5 Feb 2009 20:20:34 +0000 (21:20 +0100)]
tig-0.14

15 years agoRead tigrc(5) options from git configuration files
Jonas Fonseca [Thu, 5 Feb 2009 11:47:48 +0000 (12:47 +0100)]
Read tigrc(5) options from git configuration files

15 years agotig(1): correct info on tree view related environment variables
Jonas Fonseca [Thu, 5 Feb 2009 11:43:24 +0000 (12:43 +0100)]
tig(1): correct info on tree view related environment variables

Was not updated during the introduction of %(directory) and move to the
IO API.

15 years agoAdd release script documenting the release procedure
Jonas Fonseca [Wed, 4 Feb 2009 17:41:12 +0000 (18:41 +0100)]
Add release script documenting the release procedure

15 years agoSpell check all text files and add dictionary to speed it up
Jonas Fonseca [Wed, 4 Feb 2009 22:20:31 +0000 (23:20 +0100)]
Spell check all text files and add dictionary to speed it up

15 years agotigrc(5): document the tree view colors
Jonas Fonseca [Wed, 4 Feb 2009 10:11:24 +0000 (11:11 +0100)]
tigrc(5): document the tree view colors

Also renames the tree-parent line to tree-head.

15 years agoRefactor file mode drawing; rename tree-mode color to mode
Jonas Fonseca [Wed, 4 Feb 2009 17:40:15 +0000 (18:40 +0100)]
Refactor file mode drawing; rename tree-mode color to mode

15 years agoReplace usage of the main-author color with the author color
Jonas Fonseca [Wed, 4 Feb 2009 12:09:12 +0000 (13:09 +0100)]
Replace usage of the main-author color with the author color

It is used in draw_author() which is used by the main, blame and tree
views.

15 years agoMove usage string near parse_options
Jonas Fonseca [Wed, 4 Feb 2009 13:59:23 +0000 (14:59 +0100)]
Move usage string near parse_options

15 years agoTree view: improve handling of empty trees
Jonas Fonseca [Tue, 3 Feb 2009 21:34:44 +0000 (22:34 +0100)]
Tree view: improve handling of empty trees

15 years agoFix reverting of unmerged status entries
Jonas Fonseca [Tue, 3 Feb 2009 14:46:07 +0000 (15:46 +0100)]
Fix reverting of unmerged status entries

... by using update-index --cacheinfo.

15 years agoAdd support for horizontal scrolling
Jonas Fonseca [Mon, 2 Feb 2009 23:34:43 +0000 (00:34 +0100)]
Add support for horizontal scrolling

It is still basically a big hack, and might need some tuning.

15 years agoExpand tabs in displayed lines to not rely on ncurses to expand them
Jonas Fonseca [Tue, 3 Feb 2009 11:50:52 +0000 (12:50 +0100)]
Expand tabs in displayed lines to not rely on ncurses to expand them

15 years agoTreat empty '/' as "find next"
Jeff King [Tue, 3 Feb 2009 05:49:08 +0000 (00:49 -0500)]
Treat empty '/' as "find next"

When the user requests a forward or backwards search, if
they provide no search string then we just abort the search.
However, many other programs (such as less and vi) treat
this as "repeat the last search", so users may have their
fingers trained to do this rather than use the explicit
"find next" feature.

This patch causes tig, if there was a previous search, to
find the next (or previous, if "?" was used) match in such a
case.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
15 years agoTODO: elaborate and regroup into 'before tig-1.0' and 'long term goals'
Jonas Fonseca [Tue, 3 Feb 2009 10:33:56 +0000 (11:33 +0100)]
TODO: elaborate and regroup into 'before tig-1.0' and 'long term goals'

15 years agoMove initial view setup into parse_options
Jonas Fonseca [Sun, 18 Jan 2009 13:47:06 +0000 (14:47 +0100)]
Move initial view setup into parse_options

15 years agoMove parse_option so it has access to view definitions
Jonas Fonseca [Sun, 18 Jan 2009 13:14:17 +0000 (14:14 +0100)]
Move parse_option so it has access to view definitions

15 years agoRemove parsing of deprecated option -S and subcommands log and diff
Jonas Fonseca [Fri, 30 Jan 2009 08:43:56 +0000 (09:43 +0100)]
Remove parsing of deprecated option -S and subcommands log and diff

15 years agoRename & move read_properties and git_properties
Jonas Fonseca [Tue, 3 Feb 2009 14:01:47 +0000 (15:01 +0100)]
Rename & move read_properties and git_properties

They should be part of the IO API and are now called io_load and
run_io_load.

15 years agoUse warn() for warnings emitted during config file loading
Jonas Fonseca [Tue, 3 Feb 2009 13:47:04 +0000 (14:47 +0100)]
Use warn() for warnings emitted during config file loading

15 years agoFix scrolling bugs in gnome-terminal and (u)xterm
Jonas Fonseca [Mon, 2 Feb 2009 14:18:12 +0000 (15:18 +0100)]
Fix scrolling bugs in gnome-terminal and (u)xterm

Introduces workarounds to fix glitches appearing after the recent screen
drawing optimizations.

15 years agoBUGS: document problem with scrolling in (u)xterm
Jonas Fonseca [Mon, 2 Feb 2009 08:24:51 +0000 (09:24 +0100)]
BUGS: document problem with scrolling in (u)xterm

15 years agoTune the view clearing to wait until 2 seconds has passed
Jonas Fonseca [Sat, 31 Jan 2009 09:06:30 +0000 (10:06 +0100)]
Tune the view clearing to wait until 2 seconds has passed

The code introduced in ec9aa4f62ae2977d598dda865e6a50b9fc799428 broke
the smoothness of updates in some cases.

15 years agoHandle all cursor positioning in get_input
Jonas Fonseca [Sat, 31 Jan 2009 10:41:01 +0000 (11:41 +0100)]
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).

15 years agoOptimize drawing by updating the screen in one go
Jonas Fonseca [Sat, 31 Jan 2009 09:01:04 +0000 (10:01 +0100)]
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.

15 years agoAbbreviate author names to initials when author-width < 6
Jonas Fonseca [Fri, 30 Jan 2009 23:49:25 +0000 (00:49 +0100)]
Abbreviate author names to initials when author-width < 6

15 years agoRefactor author drawing into draw_author
Jonas Fonseca [Fri, 30 Jan 2009 21:46:47 +0000 (22:46 +0100)]
Refactor author drawing into draw_author

15 years agoFix tokenizing when parsing ~/.tigrc
Jonas Fonseca [Mon, 2 Feb 2009 08:08:46 +0000 (09:08 +0100)]
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.

15 years agoWorkaround bug exposed by the redrawwin removal in do_scroll_view
Jonas Fonseca [Fri, 30 Jan 2009 08:24:24 +0000 (09:24 +0100)]
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().

15 years agoMake cursor updating when resizing the display and loading a view
Jonas Fonseca [Fri, 30 Jan 2009 08:12:26 +0000 (09:12 +0100)]
Make cursor updating when resizing the display and loading a view

15 years agoChange scrollok strategy to leave it off unless when calling wscrl
Jonas Fonseca [Fri, 30 Jan 2009 08:03:11 +0000 (09:03 +0100)]
Change scrollok strategy to leave it off unless when calling wscrl

Should lead to fewer calls.

15 years agoInitialize status_empty flag to FALSE
Jonas Fonseca [Fri, 30 Jan 2009 07:54:19 +0000 (08:54 +0100)]
Initialize status_empty flag to FALSE

Fixes cursor restoring when loading the status view at startup.

15 years agoEliminate unneeded calls to redrawwin
Jonas Fonseca [Wed, 28 Jan 2009 22:10:10 +0000 (23:10 +0100)]
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.

15 years agoTODO: a small commit cache should be employed at some point
Jonas Fonseca [Wed, 28 Jan 2009 22:10:45 +0000 (23:10 +0100)]
TODO: a small commit cache should be employed at some point

15 years agoHelp view: show the action name similar as in Mutt's help view
Jonas Fonseca [Wed, 28 Jan 2009 18:30:17 +0000 (19:30 +0100)]
Help view: show the action name similar as in Mutt's help view

15 years agoRemove preallocation of view lines in help_open
Jonas Fonseca [Wed, 28 Jan 2009 18:28:03 +0000 (19:28 +0100)]
Remove preallocation of view lines in help_open

15 years agocorrected doubly used ID view-manipulation in manual.txt
Stefan Naewe [Wed, 28 Jan 2009 15:44:31 +0000 (16:44 +0100)]
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>
15 years agotigrc(5) & manual: move view specific actions out of the misc group
Jonas Fonseca [Sat, 24 Jan 2009 11:51:38 +0000 (12:51 +0100)]
tigrc(5) & manual: move view specific actions out of the misc group

15 years agoAdd support for loading blame for parent commits
Jonas Fonseca [Thu, 15 Jan 2009 21:41:58 +0000 (22:41 +0100)]
Add support for loading blame for parent commits

Requested by Jeff King in <20080410040213.GA29618@sigill.intra.peff.net>

15 years agoRefactor prompting for user input
Jonas Fonseca [Fri, 16 Jan 2009 13:27:13 +0000 (14:27 +0100)]
Refactor prompting for user input

15 years agoRename tree-parent action to parent
Jonas Fonseca [Sat, 24 Jan 2009 11:36:03 +0000 (12:36 +0100)]
Rename tree-parent action to parent

15 years agoMinor cleanup of the tree view code; fix enter on the first line
Jonas Fonseca [Tue, 27 Jan 2009 12:51:12 +0000 (13:51 +0100)]
Minor cleanup of the tree view code; fix enter on the first line

15 years agoTODO: remove resolved item
Jonas Fonseca [Tue, 27 Jan 2009 12:51:20 +0000 (13:51 +0100)]
TODO: remove resolved item

15 years agoTree view: improve to look less like plumbing
Jonas Fonseca [Mon, 26 Jan 2009 11:51:40 +0000 (12:51 +0100)]
Tree view: improve to look less like plumbing

It is now more like `ls` by annotating the output of ls-tree with commit
information.

15 years agoRefactor main_read to create parse_author_line
Jonas Fonseca [Tue, 27 Jan 2009 10:17:44 +0000 (11:17 +0100)]
Refactor main_read to create parse_author_line

15 years agoupdate_view: remove an unneeded goto
Jonas Fonseca [Mon, 26 Jan 2009 11:52:56 +0000 (12:52 +0100)]
update_view: remove an unneeded goto

15 years agoFix floating point bug in the blame reporting
Jonas Fonseca [Sat, 24 Jan 2009 12:24:04 +0000 (13:24 +0100)]
Fix floating point bug in the blame reporting

15 years agoAlso call end_update for views with custom open function
Jonas Fonseca [Sat, 24 Jan 2009 12:22:40 +0000 (13:22 +0100)]
Also call end_update for views with custom open function

Broken by 49dc4030694e22b7f141bfb13565783985c48b77

15 years agoAdd -O0 to the debug flags
Jonas Fonseca [Sat, 24 Jan 2009 12:22:03 +0000 (13:22 +0100)]
Add -O0 to the debug flags

15 years agoRectify arg indexes changes in blame --no-color fix
Jonas Fonseca [Sat, 24 Jan 2009 11:59:32 +0000 (12:59 +0100)]
Rectify arg indexes changes in blame --no-color fix

Introduced in 78685441f4effd81082a53abb4c1246ebd1e0e49

15 years agoFix status loading of unmerged entries to avoid access to freed memory
Jonas Fonseca [Sat, 24 Jan 2009 11:52:25 +0000 (12:52 +0100)]
Fix status loading of unmerged entries to avoid access to freed memory

15 years agoFix kill_io() to only call kill(2) when pid is non-zero
Jonas Fonseca [Fri, 23 Jan 2009 17:12:25 +0000 (18:12 +0100)]
Fix kill_io() to only call kill(2) when pid is non-zero

15 years agoBlame view: fix reloading of the diff view for changes not yet committed
Jonas Fonseca [Fri, 23 Jan 2009 11:37:08 +0000 (12:37 +0100)]
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).

15 years agoOops, always specify --no-color when using git diff
Jonas Fonseca [Fri, 23 Jan 2009 11:23:29 +0000 (12:23 +0100)]
Oops, always specify --no-color when using git diff

15 years agoBlame view: fix diffing of lines marked as not yet committed
Jonas Fonseca [Fri, 23 Jan 2009 11:11:01 +0000 (12:11 +0100)]
Blame view: fix diffing of lines marked as not yet committed

15 years agoAdd support for restoring the view position in reloadable views
Jonas Fonseca [Fri, 24 Oct 2008 08:56:51 +0000 (10:56 +0200)]
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.

15 years agoFix status_exists to be consistent with data displayed in the stage view
Jonas Fonseca [Thu, 22 Jan 2009 16:00:45 +0000 (17:00 +0100)]
Fix status_exists to be consistent with data displayed in the stage view

15 years agoMake it possible to call select_view_line for non-displayed views
Jonas Fonseca [Thu, 22 Jan 2009 15:59:00 +0000 (16:59 +0100)]
Make it possible to call select_view_line for non-displayed views

15 years agoRefactor find_next_line into select_view_line
Jonas Fonseca [Sun, 18 Jan 2009 01:58:47 +0000 (02:58 +0100)]
Refactor find_next_line into select_view_line

15 years agoRefactor user input handling into separate function
Jonas Fonseca [Sat, 17 Jan 2009 13:05:00 +0000 (14:05 +0100)]
Refactor user input handling into separate function

Fixes resizing while the prompt is open.

15 years agoAdd support for opening any blob in an editor
Jonas Fonseca [Sat, 17 Jan 2009 09:08:41 +0000 (10:08 +0100)]
Add support for opening any blob in an editor

15 years agoPrefer werase to wclear when possible to reduce flickering
Jonas Fonseca [Mon, 19 Jan 2009 14:50:00 +0000 (15:50 +0100)]
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.

15 years agoCleanup and improve option toggling actions to include help message
Jonas Fonseca [Mon, 19 Jan 2009 15:29:59 +0000 (16:29 +0100)]
Cleanup and improve option toggling actions to include help message

15 years agoFix stage reloading to not close when staging chunks from group diff
Jonas Fonseca [Wed, 21 Jan 2009 22:14:17 +0000 (23:14 +0100)]
Fix stage reloading to not close when staging chunks from group diff

15 years agoDo not terminate the update when switching back to a loading view
Jonas Fonseca [Wed, 21 Jan 2009 15:27:15 +0000 (16:27 +0100)]
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.

15 years agoFix regression of main view drawing
Jonas Fonseca [Mon, 19 Jan 2009 21:46:24 +0000 (22:46 +0100)]
Fix regression of main view drawing

Hopefully last fix for dirty flag regressions.

15 years agoCleanup update_view's read loop
Jonas Fonseca [Mon, 19 Jan 2009 14:33:43 +0000 (15:33 +0100)]
Cleanup update_view's read loop

15 years agoFix regression in handling of data for non-UTF-8 locales
Jonas Fonseca [Mon, 19 Jan 2009 14:19:54 +0000 (15:19 +0100)]
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.

15 years agoFix another regression from the dirty flag changes causing flickering
Jonas Fonseca [Sat, 17 Jan 2009 22:10:21 +0000 (23:10 +0100)]
Fix another regression from the dirty flag changes causing flickering

Use redraw_view_from() instead of redraw_view() to avoid excessive calls
to wclear().