Mercurial > vim
comparison src/insexpand.c @ 32295:bea4ebf594c6 v9.0.1479
patch 9.0.1479: small source file problems; outdated list of distrib. files
Commit: https://github.com/vim/vim/commit/f39d9e9dca443e42920066be3a98fd9780e4ed33
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 22 22:54:40 2023 +0100
patch 9.0.1479: small source file problems; outdated list of distrib. files
Problem: Small source file problems; outdated list of distributed files.
Solution: Small updates to source files and list of distributed files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 23 Apr 2023 00:00:04 +0200 |
parents | fc1d95479511 |
children | 87f59a64efab |
comparison
equal
deleted
inserted
replaced
32294:b2e8663e6dcc | 32295:bea4ebf594c6 |
---|---|
2999 int number = 0; | 2999 int number = 0; |
3000 compl_T *match; | 3000 compl_T *match; |
3001 | 3001 |
3002 if (compl_dir_forward()) | 3002 if (compl_dir_forward()) |
3003 { | 3003 { |
3004 // search backwards for the first valid (!= -1) number. | 3004 // Search backwards for the first valid (!= -1) number. |
3005 // This should normally succeed already at the first loop | 3005 // This should normally succeed already at the first loop |
3006 // cycle, so it's fast! | 3006 // cycle, so it's fast! |
3007 for (match = compl_curr_match->cp_prev; match != NULL | 3007 for (match = compl_curr_match->cp_prev; match != NULL |
3008 && !is_first_match(match); match = match->cp_prev) | 3008 && !is_first_match(match); match = match->cp_prev) |
3009 if (match->cp_number != -1) | 3009 if (match->cp_number != -1) |
3010 { | 3010 { |
3011 number = match->cp_number; | 3011 number = match->cp_number; |
3012 break; | 3012 break; |
3013 } | 3013 } |
3014 if (match != NULL) | 3014 if (match != NULL) |
3015 // go up and assign all numbers which are not assigned | 3015 // go up and assign all numbers which are not assigned yet |
3016 // yet | |
3017 for (match = match->cp_next; | 3016 for (match = match->cp_next; |
3018 match != NULL && match->cp_number == -1; | 3017 match != NULL && match->cp_number == -1; |
3019 match = match->cp_next) | 3018 match = match->cp_next) |
3020 match->cp_number = ++number; | 3019 match->cp_number = ++number; |
3021 } | 3020 } |
3022 else // BACKWARD | 3021 else // BACKWARD |
3023 { | 3022 { |
3024 // search forwards (upwards) for the first valid (!= -1) | 3023 // Search forwards (upwards) for the first valid (!= -1) |
3025 // number. This should normally succeed already at the | 3024 // number. This should normally succeed already at the |
3026 // first loop cycle, so it's fast! | 3025 // first loop cycle, so it's fast! |
3027 for (match = compl_curr_match->cp_next; match != NULL | 3026 for (match = compl_curr_match->cp_next; match != NULL |
3028 && !is_first_match(match); match = match->cp_next) | 3027 && !is_first_match(match); match = match->cp_next) |
3029 if (match->cp_number != -1) | 3028 if (match->cp_number != -1) |
3030 { | 3029 { |
3031 number = match->cp_number; | 3030 number = match->cp_number; |
3032 break; | 3031 break; |
3033 } | 3032 } |
3034 if (match != NULL) | 3033 if (match != NULL) |
3035 // go down and assign all numbers which are not | 3034 // go down and assign all numbers which are not assigned yet |
3036 // assigned yet | |
3037 for (match = match->cp_prev; match | 3035 for (match = match->cp_prev; match |
3038 && match->cp_number == -1; | 3036 && match->cp_number == -1; |
3039 match = match->cp_prev) | 3037 match = match->cp_prev) |
3040 match->cp_number = ++number; | 3038 match->cp_number = ++number; |
3041 } | 3039 } |