Hi,

there is a new search type in cscope 15.8 to search for assignments
and this patch allows you to use it from vim.
The same functionality had been offered before by a RedHat patch.
However, that patch reused search type 4 (text) and therefore didn't
require changes to vim.
See the cscope Changelog, specifically the entry for 2012-03-05.

Thanks,

Uli

diff -rc ./src/if_cscope.c ../vim-7.3.429/src/if_cscope.c
*** ./src/if_cscope.c   2012-09-01 12:21:02.251387233 +0200
--- ../vim-7.3.429/src/if_cscope.c      2012-09-01 12:21:15.419387585 +0200
***************
*** 792,797 ****
--- 792,800 ----
      case '8' : case 'i' :
        search = 8;
        break;
+     case '9' : case 'a' :
+       search = 9;
+       break;
      default :
        (void)EMSG(_("E561: unknown cscope search type"));
        cs_usage_msg(Find);
***************
*** 1345,1351 ****
                       "       g: Find this definition\n"
                       "       i: Find files #including this file\n"
                       "       s: Find this C symbol\n"
!                      "       t: Find this text string\n"));

        cmdp++;
      }
--- 1348,1355 ----
                       "       g: Find this definition\n"
                       "       i: Find files #including this file\n"
                       "       s: Find this C symbol\n"
!                      "       t: Find this text string\n"
!                      "       a: Find assignments to this symbol\n"));

        cmdp++;
      }
diff -rc ./src/if_cscope.h ../vim-7.3.429/src/if_cscope.h
*** ./src/if_cscope.h   2012-02-05 01:18:48.000000000 +0100
--- ../vim-7.3.429/src/if_cscope.h      2012-09-01 12:23:09.287390636 +0200
***************
*** 35,45 ****
   * d 2name    Find functions called by this function
   * c 3name    Find functions calling this function
   * t 4string  find text string (cscope 12.9)
!  * t 4name    Find assignments to (cscope 13.3)
   *   5pattern change pattern -- NOT USED
   * e 6pattern Find this egrep pattern
   * f 7name    Find this file
   * i 8name    Find files #including this file
   */

  typedef struct {
--- 35,46 ----
   * d 2name    Find functions called by this function
   * c 3name    Find functions calling this function
   * t 4string  find text string (cscope 12.9)
!  * t 4name    Find assignments to (RedHat cscope 13.3)
   *   5pattern change pattern -- NOT USED
   * e 6pattern Find this egrep pattern
   * f 7name    Find this file
   * i 8name    Find files #including this file
+ * a 9name     Find assignments to (cscope 15.8)
   */

  typedef struct {

-- 
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

Raspunde prin e-mail lui