[SCM] Vim packaging branch, deb/set-cp-after-init, updated. upstream/7.2b.001-35-ge6c9dca

James Vega jamessan at debian.org
Fri Jul 25 14:36:52 UTC 2008


The following commit has been merged in the deb/set-cp-after-init branch:
commit e6c9dca86c5639f5e96ea13351feda8388e53357
Merge: a47af491726895189f0d963fc649ed7670cc9222 7e43bd659780e0087f069b45997569a86457db11
Author: James Vega <jamessan at debian.org>
Date:   Fri Jul 25 10:25:59 2008 -0400

    Merge branch 'upstream' into deb/set-cp-after-init

diff --combined src/main.c
index df81ed1,a9eb460..23347c7
--- a/src/main.c
+++ b/src/main.c
@@@ -35,9 -35,6 +35,9 @@@
  #define	WIN_VER	    2	    /* "-O" vertically split windows */
  #define	WIN_TABS    3	    /* "-p" windows on tab pages */
  
 +#define SET_CP   1  /* "-C" set compatible */
 +#define SET_NOCP 2  /* "-N" set nocompatible */
 +
  /* Struct for various parameters passed between main() and other functions. */
  typedef struct
  {
@@@ -90,7 -87,6 +90,7 @@@
  #ifdef FEAT_DIFF
      int		diff_mode;		/* start with 'diff' set */
  #endif
 +    int		option_cp;		/* 0, SET_CP, SET_NOCP */
  } mparm_T;
  
  /* Values for edit_type. */
@@@ -643,13 -639,6 +643,13 @@@ mai
      }
  #endif
  
 +    /* -N/-C given on the command-line.  Now that the startup files are done
 +     * being sourced, we set the option. */
 +    if (params.option_cp == SET_CP)
 +	change_compatible(TRUE);
 +    else if (params.option_cp == SET_NOCP)
 +	change_compatible(FALSE);
 +
  #ifdef SPAWNO		/* special MSDOS swapping library */
      init_SPAWNO("", SWAP_ANY);
  #endif
@@@ -1766,7 -1755,7 +1766,7 @@@ command_line_scan(parmp
  		break;
  
  	    case 'C':		/* "-C"  Compatible */
 -		change_compatible(TRUE);
 +		parmp->option_cp = SET_CP;
  		break;
  
  	    case 'e':		/* "-e" Ex mode */
@@@ -1839,7 -1828,7 +1839,7 @@@
  		break;
  
  	    case 'N':		/* "-N"  Nocompatible */
 -		change_compatible(FALSE);
 +		parmp->option_cp = SET_NOCP;
  		break;
  
  	    case 'n':		/* "-n" no swap file */
@@@ -2256,7 -2245,12 +2256,12 @@@ scripterror
  		/* Remember this argument has been added to the argument list.
  		 * Needed when 'encoding' is changed. */
  		used_file_arg(argv[0], parmp->literal, parmp->full_path,
- 							    parmp->diff_mode);
+ # ifdef FEAT_DIFF
+ 							    parmp->diff_mode
+ # else
+ 							    FALSE
+ # endif
+ 							    );
  	    }
  #endif
  	}
@@@ -2535,7 -2529,6 +2540,6 @@@ edit_buffers(parmp
      int		arg_idx;		/* index in argument list */
      int		i;
      int		advance = TRUE;
-     buf_T	*old_curbuf;
  
  # ifdef FEAT_AUTOCMD
      /*
@@@ -2588,21 -2581,26 +2592,26 @@@
  	    curwin->w_arg_idx = arg_idx;
  	    /* Edit file from arg list, if there is one.  When "Quit" selected
  	     * at the ATTENTION prompt close the window. */
- 	    old_curbuf = curbuf;
+ # ifdef HAS_SWAP_EXISTS_ACTION
+ 	    swap_exists_did_quit = FALSE;
+ # endif
  	    (void)do_ecmd(0, arg_idx < GARGCOUNT
  			  ? alist_name(&GARGLIST[arg_idx]) : NULL,
  			  NULL, NULL, ECMD_LASTL, ECMD_HIDE);
- 	    if (curbuf == old_curbuf)
+ # ifdef HAS_SWAP_EXISTS_ACTION
+ 	    if (swap_exists_did_quit)
  	    {
+ 		/* abort or quit selected */
  		if (got_int || only_one_window())
  		{
- 		    /* abort selected or quit and only one window */
+ 		    /* abort selected and only one window */
  		    did_emsg = FALSE;   /* avoid hit-enter prompt */
  		    getout(1);
  		}
  		win_close(curwin, TRUE);
  		advance = FALSE;
  	    }
+ # endif
  	    if (arg_idx == GARGCOUNT - 1)
  		arg_had_last = TRUE;
  	    ++arg_idx;

-- 
Vim packaging



More information about the pkg-vim-maintainers mailing list