From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27017 invoked by alias); 2 Mar 2020 19:26:33 -0000 Mailing-List: contact cygwin-cvs-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-cvs-owner@cygwin.com Received: (qmail 26976 invoked by uid 9078); 2 Mar 2020 19:26:33 -0000 Date: Mon, 02 Mar 2020 19:26:00 -0000 Message-ID: <20200302192633.26974.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: console: Revise the code to fix tab position. X-Act-Checkin: newlib-cygwin X-Git-Author: Takashi Yano X-Git-Refname: refs/heads/master X-Git-Oldrev: 1b7fcf22bea529fba920310dcd2db144bb24ccc6 X-Git-Newrev: 7f5051d76662838103666492a33505e0801c1ee7 X-SW-Source: 2020-q1/txt/msg00097.txt https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7f5051d76662838103666492a33505e0801c1ee7 commit 7f5051d76662838103666492a33505e0801c1ee7 Author: Takashi Yano Date: Mon Mar 2 10:12:54 2020 +0900 Cygwin: console: Revise the code to fix tab position. - This patch fixes the issue that the cursor position is broken if window size is changed while executing vim, less etc. Diff: --- winsup/cygwin/fhandler_console.cc | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 64e12b8..7c97a78 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -417,19 +417,10 @@ fhandler_console::set_cursor_maybe () void fhandler_console::fix_tab_position (void) { - char buf[2048] = {0,}; - /* Save cursor position */ - __small_sprintf (buf+strlen (buf), "\0337"); - /* Clear all horizontal tabs */ - __small_sprintf (buf+strlen (buf), "\033[3g"); - /* Set horizontal tabs */ - for (int col=8; col