From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id GAA28661 for ; Wed, 29 May 1996 06:54:14 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id QAA21889; Tue, 28 May 1996 16:45:28 -0400 (EDT) Resent-Date: Tue, 28 May 1996 16:45:28 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199605282045.WAA13131@bolyai.cs.elte.hu> Subject: Re: Beta 19[no patches], C-t at the beginning of a line To: steve@miranova.com (Steven L Baur) Date: Tue, 28 May 1996 22:45:35 +0200 (MET DST) Cc: zsh-workers@math.gatech.edu In-Reply-To: from Steven L Baur at "May 28, 96 09:43:59 am" Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368 X-Mailer: ELM [version 2.4ME+ PL16 (25)] MIME-Version: 1.0 Content-Type: application/pgp; format=text; x-action=sign Content-Transfer-Encoding: 8bit Resent-Message-ID: <"D0Dvy.0.xL5.eNsgn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1213 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu -----BEGIN PGP SIGNED MESSAGE----- > I have Emacs bindings set, and C-t bound to gosmacs-transpose-chars. > When C-t is typed as the first characters of a line, the cursor moves > to beginning of the previous line, and everything typed with the cursor > in that position comes out strange: ``a'' is ^ß (beta), most other letters > come out as ^@. Hitting C-k causes a coredump. > > Typing one character, and then hitting C-t causes the typed character > to be changed to a ^@ and the cursor jumped to the previous line. Here is the fix. Zoltan *** Src/zle_misc.c 1996/05/21 18:58:07 2.15 --- Src/zle_misc.c 1996/05/28 20:36:54 *************** *** 169,175 **** int cc; if (cs < 2 || line[cs - 1] == '\n' || line[cs - 2] == '\n') { ! if (line[cs] == '\n' || line[cs + 1] == '\n') { feep(); return; } --- 169,177 ---- int cc; if (cs < 2 || line[cs - 1] == '\n' || line[cs - 2] == '\n') { ! if (cs == ll || line[cs] == '\n' || ! ((cs + 1 == ll || line[cs + 1] == '\n') && ! (!cs || line[cs - 1] == '\n'))) { feep(); return; } -----BEGIN PGP SIGNATURE----- Version: 2.6.3i Charset: noconv iQCVAwUBMatl7AupSCiLN749AQENCQP9GtgxXpBhPxwrt9rKJZbsSu2UFKUknnnU QBcww2xHMKQVAI+SgB8HdX70zLc/hlbcDprRbp4pvFMVVVxmSXSxaZaujlUWWk3j WtSr/BfLZ2ypf0pq7DKoDTNcr2fdcPJ8i9M6J+7lQsBZJVbY20etV/W/snPzW4f4 BZcHOgUP81U= =yQRn -----END PGP SIGNATURE-----