~ubuntu-branches/debian/sid/neovim/sid

« back to all changes in this revision

Viewing changes to src/nvim/getchar.c

  • Committer: Package Import Robot
  • Author(s): James McCoy
  • Date: 2016-04-18 21:42:19 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20160418214219-1e6d4o1fwqarzk46
Tags: 0.1.3-1
* New upstream release.  (Closes: #820562)
* debian/control:
  + Remove unnecessary luarocks Build-Depends
  + Add libkvm-dev Build-Depends for kfreebsd-*
  + Add python(3)-neovim to Recommends.  (Closes: #812737)
  + Declare compiance with policy 3.9.8, no changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1380
1380
  } else {
1381
1381
    mod_mask = 0x0;
1382
1382
    last_recorded_len = 0;
1383
 
    for (;; ) {                 /* this is done twice if there are modifiers */
1384
 
      if (mod_mask) {           /* no mapping after modifier has been read */
 
1383
    for (;; ) {                 // this is done twice if there are modifiers
 
1384
      bool did_inc = false;
 
1385
      if (mod_mask) {           // no mapping after modifier has been read
1385
1386
        ++no_mapping;
1386
1387
        ++allow_keys;
 
1388
        did_inc = true;         // mod_mask may change value
1387
1389
      }
1388
 
      c = vgetorpeek(TRUE);
1389
 
      if (mod_mask) {
 
1390
      c = vgetorpeek(true);
 
1391
      if (did_inc) {
1390
1392
        --no_mapping;
1391
1393
        --allow_keys;
1392
1394
      }
2913
2915
                did_it = TRUE;
2914
2916
              }
2915
2917
            }
2916
 
            if (mp->m_mode == 0) {              /* entry can be deleted */
2917
 
              map_free(mpp);
2918
 
              continue;                         /* continue with *mpp */
 
2918
            if (mp->m_mode == 0) {              // entry can be deleted
 
2919
              mapblock_free(mpp);
 
2920
              continue;                         // continue with *mpp
2919
2921
            }
2920
2922
 
2921
2923
            /*
3010
3012
 * Delete one entry from the abbrlist or maphash[].
3011
3013
 * "mpp" is a pointer to the m_next field of the PREVIOUS entry!
3012
3014
 */
3013
 
static void map_free(mapblock_T **mpp)
 
3015
static void mapblock_free(mapblock_T **mpp)
3014
3016
{
3015
3017
  mapblock_T  *mp;
3016
3018
 
3078
3080
 * Clear all mappings or abbreviations.
3079
3081
 * 'abbr' should be FALSE for mappings, TRUE for abbreviations.
3080
3082
 */
3081
 
void map_clear(char_u *cmdp, char_u *arg, int forceit, int abbr)
 
3083
void map_clear_mode(char_u *cmdp, char_u *arg, int forceit, int abbr)
3082
3084
{
3083
3085
  int mode;
3084
3086
  int local;
3130
3132
      mp = *mpp;
3131
3133
      if (mp->m_mode & mode) {
3132
3134
        mp->m_mode &= ~mode;
3133
 
        if (mp->m_mode == 0) {       /* entry can be deleted */
3134
 
          map_free(mpp);
 
3135
        if (mp->m_mode == 0) {       // entry can be deleted
 
3136
          mapblock_free(mpp);
3135
3137
          continue;
3136
3138
        }
3137
3139
        /*