zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@ny.frontiercomm.net>
To: zsh-workers@math.gatech.edu (Zsh hacking and development)
Subject: expand-or-complete-prefix fix
Date: Sun, 1 Jun 1997 02:46:54 -0400 (EDT)	[thread overview]
Message-ID: <199706010646.CAA09875@hzoli.home> (raw)

This patch should fix expand-or-complete-prefix in zsh-3.1.2-test1.

Zoltan


*** Src/Zle/zle_tricky.c	1997/06/01 06:13:15	3.1.2.12
--- Src/Zle/zle_tricky.c	1997/06/01 06:42:50
***************
*** 3850,3872 ****
      int m = zmult;
  
      /* insert a space and backspace. */
      c = ' ';
      selfinsert();		/* insert the extra character */
!     forwardchar();		/* move towards beginning */
      
      remove_at = cs;
  
      /* do the expansion/completion. */
      c = csafe;
-     zmult = 1;
      expandorcomplete();		/* complete. */
-     zmult = -1;
  
      /* remove the inserted space. */
!     if (remove_at >= 0) {
! 	backwardchar();		/* move towards ends */
  	deletechar();		/* delete the added space. */
-     }
      zmult = m;
      remove_at = -1;
  }
--- 3850,3869 ----
      int m = zmult;
  
      /* insert a space and backspace. */
+     zmult = 1;
      c = ' ';
      selfinsert();		/* insert the extra character */
!     backwardchar();		/* move towards beginning */
      
      remove_at = cs;
  
      /* do the expansion/completion. */
      c = csafe;
      expandorcomplete();		/* complete. */
  
      /* remove the inserted space. */
!     if (remove_at >= 0)
  	deletechar();		/* delete the added space. */
      zmult = m;
      remove_at = -1;
  }


                 reply	other threads:[~1997-06-01  7:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199706010646.CAA09875@hzoli.home \
    --to=hzoli@ny.frontiercomm.net \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).