Patch 8.0.1758
Problem:    open_line() returns TRUE/FALSE for success/failure.
Solution:   Return OK or FAIL.
Files:      src/misc1.c, src/normal.c, src/edit.c


*** ../vim-8.0.1757/src/misc1.c 2018-04-24 17:41:52.077176530 +0200
--- src/misc1.c 2018-04-24 19:35:00.133346944 +0200
***************
*** 588,594 ****
   * "second_line_indent": indent for after ^^D in Insert mode or if flag
   *                      OPENLINE_COM_LIST
   *
!  * Return TRUE for success, FALSE for failure
   */
      int
  open_line(
--- 588,594 ----
   * "second_line_indent": indent for after ^^D in Insert mode or if flag
   *                      OPENLINE_COM_LIST
   *
!  * Return OK for success, FAIL for failure
   */
      int
  open_line(
***************
*** 606,612 ****
      int               newindent = 0;          /* auto-indent of the new line 
*/
      int               n;
      int               trunc_line = FALSE;     /* truncate current line 
afterwards */
!     int               retval = FALSE;         /* return value, default is 
FAIL */
  #ifdef FEAT_COMMENTS
      int               extra_len = 0;          /* length of p_extra string */
      int               lead_len;               /* length of comment leader */
--- 606,612 ----
      int               newindent = 0;          /* auto-indent of the new line 
*/
      int               n;
      int               trunc_line = FALSE;     /* truncate current line 
afterwards */
!     int               retval = FAIL;          /* return value */
  #ifdef FEAT_COMMENTS
      int               extra_len = 0;          /* length of p_extra string */
      int               lead_len;               /* length of comment leader */
***************
*** 1642,1648 ****
      }
  #endif
  
!     retval = TRUE;            /* success! */
  theend:
      curbuf->b_p_pi = saved_pi;
      vim_free(saved_line);
--- 1642,1648 ----
      }
  #endif
  
!     retval = OK;              /* success! */
  theend:
      curbuf->b_p_pi = saved_pi;
      vim_free(saved_line);
*** ../vim-8.0.1757/src/normal.c        2018-04-24 15:19:00.503068778 +0200
--- src/normal.c        2018-04-24 19:31:06.184653762 +0200
***************
*** 8491,8497 ****
  #ifdef FEAT_COMMENTS
                    has_format_option(FO_OPEN_COMS) ? OPENLINE_DO_COM :
  #endif
!                   0, 0))
        {
  #ifdef FEAT_CONCEAL
            if (curwin->w_p_cole > 0 && oldline != curwin->w_cursor.lnum)
--- 8491,8497 ----
  #ifdef FEAT_COMMENTS
                    has_format_option(FO_OPEN_COMS) ? OPENLINE_DO_COM :
  #endif
!                   0, 0) == OK)
        {
  #ifdef FEAT_CONCEAL
            if (curwin->w_p_cole > 0 && oldline != curwin->w_cursor.lnum)
*** ../vim-8.0.1757/src/edit.c  2018-04-17 22:14:27.456314045 +0200
--- src/edit.c  2018-04-24 19:30:49.768874204 +0200
***************
*** 1374,1380 ****
                goto doESCkey;
            }
  #endif
!           if (ins_eol(c) && !p_im)
                goto doESCkey;      /* out of memory */
            auto_format(FALSE, FALSE);
            inserted_space = FALSE;
--- 1374,1380 ----
                goto doESCkey;
            }
  #endif
!           if (ins_eol(c) == FAIL && !p_im)
                goto doESCkey;      /* out of memory */
            auto_format(FALSE, FALSE);
            inserted_space = FALSE;
***************
*** 10201,10207 ****
  
  /*
   * Handle CR or NL in insert mode.
!  * Return TRUE when out of memory or can't undo.
   */
      static int
  ins_eol(int c)
--- 10201,10207 ----
  
  /*
   * Handle CR or NL in insert mode.
!  * Return FAIL when out of memory or can't undo.
   */
      static int
  ins_eol(int c)
***************
*** 10266,10272 ****
      foldOpenCursor();
  #endif
  
!     return (!i);
  }
  
  #ifdef FEAT_DIGRAPHS
--- 10266,10272 ----
      foldOpenCursor();
  #endif
  
!     return i;
  }
  
  #ifdef FEAT_DIGRAPHS
*** ../vim-8.0.1757/src/version.c       2018-04-24 18:39:08.263417919 +0200
--- src/version.c       2018-04-24 19:34:16.569908780 +0200
***************
*** 763,764 ****
--- 763,766 ----
  {   /* Add new patch number below this line */
+ /**/
+     1758,
  /**/

-- 
ARTHUR: This new learning amazes me, Sir Bedevere.  Explain again how sheep's
        bladders may be employed to prevent earthquakes.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui