| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
| |
vsnprintf can return -1. I've seen it do this when writing to a small
buffer while vsnprintf(NULL, 0, ...) returns a valid length. I'd prefer
not to rely on the latter working with arbitrary old Windows runtimes
so just skip ANSI emulation if -1 is returned.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent changes to make the Windows console behave more like a *nix
terminal didn't work too well for vi/less. On *nix the terminal
buffer can't be scrolled while such screen-based applications are
running. In the Windows console this remained possible and led to
confusion.
Add a new routine to allow vi/less to revert to their previous
behaviour where the cursor is positioned at the top of the buffer
and the entire buffer is cleared.
|
|
|
|
|
|
| |
When a normal *nix terminal has been scrolled back through its
buffer, any keypress will return to the cursor position. Add code
to lineedit.c to do the same for the Windows console.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Various tasks on the shell command line (e.g. backspace, DEL,
reverse search) were found to be slow when the console screen
buffer was very large. This was because the entire buffer was
being cleared in erase_till_end_of_screen().
Rewrite erase_till_end_of_screen() to only clear to the end of the
visible screen and to be tidier. (Based on a suggestion by GitHub
user avih.)
Also, modify move_cursor to use coordinates relative to the current
display (as ANSI escapes expect) rather than relative to the screen
buffer.
|
|
|
|
|
|
|
|
|
|
| |
It seems that the cursor positioning escape sequence 'ESC[n;mH'
allows n and m values of 0 or 1 to represent the leftmost/topmost
position. Allow for this and also fix handling of missing values.
When the screen is cleared using FillConsoleOutputCharacterA it's
also necessary to make explicit calls to FillConsoleOutputAttribute
to reset attributes.
|
| |
|
|
|
|
|
| |
These escape sequences are required for proper handling of line
editing when the input exceeds the console width.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Windows console applications use different codepages for console I/O
and the rest of the API:
http://msdn.microsoft.com/en-us/goglobal/bb688114.aspx#E2F
Attempt to workaround this by converting characters when they're read from
and written to the console. Not all possible paths are handled.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sometimes
The function FillConsoleOutputCharacterA() was pretty content in XP to take a NULL
pointer if we did not want to store the number of written columns. In Windows 7,
it crashes, but only when called from within Git Bash, not from within cmd.exe.
Go figure.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
|
| |
|
| |
|
| |
|
| |
|
|
Support sequences are mostly color ones.
This was extracted from commit
e56b799d6ad8afba4168fffa7218d44c041a72d2
in Git repository. Changes from original version:
> diff --git a/home/pclouds/w/git/compat/winansi.c b/tmp/winansi2.c
> index 44dc293..e2e7010 100644
> --- a/home/pclouds/w/git/compat/winansi.c
> +++ b/tmp/winansi2.c
> @@ -2,8 +2,9 @@
> * Copyright 2008 Peter Harris <git@peter.is-a-geek.org>
> */
>
> +#include "libbb.h"
> #include <windows.h>
> -#include "../git-compat-util.h"
> +#undef PACKED
>
> /*
> Functions to be wrapped:
|