aboutsummaryrefslogtreecommitdiff
path: root/win32/winansi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* win32: don't attempt ANSI emulation on data containing NUL charactersRon Yorston2016-08-161-4/+11
|
* win32: allow for vsnprintf returning -1Ron Yorston2016-07-081-1/+6
| | | | | | | 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.
* winansi: revert to previous console behaviour for vi/lessRon Yorston2016-04-261-0/+18
| | | | | | | | | | | | 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.
* lineedit: move console viewport to cursor on keypressRon Yorston2016-04-261-1/+1
| | | | | | 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.
* winansi: speed up clearing of screenRon Yorston2016-04-261-15/+10
| | | | | | | | | | | | | | | 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.
* winansi: fixes to cursor positioning, screen clearingRon Yorston2015-07-171-4/+15
| | | | | | | | | | 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.
* Implement escape sequence for cursor downRon Yorston2014-04-091-21/+12
|
* Implement ANSI escape sequences for cursor up/forwardRon Yorston2014-04-071-0/+30
| | | | | These escape sequences are required for proper handling of line editing when the input exceeds the console width.
* Implement vprintf replacementRon Yorston2014-03-201-1/+2
|
* Implement getc replacementRon Yorston2014-03-201-0/+24
|
* Implement read replacement to handle OEM codepagesRon Yorston2014-03-201-0/+26
|
* Fixes to write replacementRon Yorston2014-03-201-2/+2
|
* Implement write replacement to handle OEM codepagesRon Yorston2014-03-201-1/+75
|
* Implement puts replacement to handle OEM codepagesRon Yorston2014-03-191-4/+24
|
* Use OEM codepage for console I/ORon Yorston2014-03-191-4/+80
| | | | | | | | | | 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.
* winansi: skip DECTCEM sequence to avoid ugliness in viRon Yorston2012-10-101-0/+7
|
* win32: implement ioctlRon Yorston2012-04-231-1/+1
|
* Add code to find console dimensions in WIN32Ron Yorston2012-02-201-0/+17
|
* Fix off-by-one error in cursor positioningRon Yorston2012-02-171-1/+1
|
* Fix crash in Windows 7 ANSI emulationRon Yorston2012-02-071-2/+3
|
* Work around a regression in Windows 7, causing erase_in_line() to crash ↵Johannes Schindelin2012-02-071-1/+2
| | | | | | | | | | | | | 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>
* win32: winansi: implement \033[%u;%uHNguyễn Thái Ngọc Duy2010-09-141-0/+7
|
* win32: winansi: implement \033[H (no param)Nguyễn Thái Ngọc Duy2010-09-141-0/+16
|
* win32: winansi: implement \033[%uDNguyễn Thái Ngọc Duy2010-09-141-0/+15
|
* win32: winansi: implement \033[JNguyễn Thái Ngọc Duy2010-09-141-0/+21
|
* win32: Support certain ANSI sequences on cmd.exeNguyễn Thái Ngọc Duy2010-09-101-0/+358
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: