Loading ...
Sorry, an error occurred while loading the content.

Patch 6.0.020

Expand Messages
  • Bram Moolenaar
    Patch 6.0.020 Problem: When obtaining the value of a global variable internally, could get the function-local value instead. Applies to using and
    Message 1 of 1 , Oct 22, 2001
    • 0 Attachment
      Patch 6.0.020
      Problem: When obtaining the value of a global variable internally, could
      get the function-local value instead. Applies to using <Leader>
      and <LocalLeader> and resetting highlighting in a function.
      Solution: Prepend "g:" to the variable name. (Aric Blumer)
      Files: src/syntax.c, src/term.c


      *** ../vim60.19/src/syntax.c Wed Sep 26 16:12:52 2001
      --- src/syntax.c Mon Oct 22 18:36:33 2001
      ***************
      *** 5871,5877 ****
      * Try finding the color scheme file. Used when a color file was loaded
      * and 'background' or 't_Co' is changed.
      */
      ! p = get_var_value((char_u *)"colors_name");
      if (p != NULL && load_colors(p) == OK)
      return;
      #endif
      --- 5871,5877 ----
      * Try finding the color scheme file. Used when a color file was loaded
      * and 'background' or 't_Co' is changed.
      */
      ! p = get_var_value((char_u *)"g:colors_name");
      if (p != NULL && load_colors(p) == OK)
      return;
      #endif
      ***************
      *** 5903,5909 ****
      /*
      * If syntax highlighting is enabled load the highlighting for it.
      */
      ! if (get_var_value((char_u *)"syntax_on") != NULL)
      (void)cmd_runtime((char_u *)"syntax/syncolor.vim", TRUE);
      #endif
      }
      --- 5903,5909 ----
      /*
      * If syntax highlighting is enabled load the highlighting for it.
      */
      ! if (get_var_value((char_u *)"g:syntax_on") != NULL)
      (void)cmd_runtime((char_u *)"syntax/syncolor.vim", TRUE);
      #endif
      }
      *** ../vim60.19/src/term.c Sun Oct 21 12:38:02 2001
      --- src/term.c Mon Oct 22 18:37:53 2001
      ***************
      *** 4714,4725 ****
      if (STRNICMP(src, "<Leader>", 8) == 0)
      {
      len = 8;
      ! p = get_var_value((char_u *)"mapleader");
      }
      else if (STRNICMP(src, "<LocalLeader>", 13) == 0)
      {
      len = 13;
      ! p = get_var_value((char_u *)"maplocalleader");
      }
      else
      {
      --- 4714,4725 ----
      if (STRNICMP(src, "<Leader>", 8) == 0)
      {
      len = 8;
      ! p = get_var_value((char_u *)"g:mapleader");
      }
      else if (STRNICMP(src, "<LocalLeader>", 13) == 0)
      {
      len = 13;
      ! p = get_var_value((char_u *)"g:maplocalleader");
      }
      else
      {
      *** ../vim60.19/src/version.c Mon Oct 22 12:52:35 2001
      --- src/version.c Mon Oct 22 18:38:09 2001
      ***************
      *** 608,609 ****
      --- 608,611 ----
      { /* Add new patch number below this line */
      + /**/
      + 20,
      /**/

      --
      Rule #1: Don't give somebody a tool that he's going to hurt himself with.

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.