diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-08-15 21:41:48 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-08-15 21:41:48 +0000 |
commit | ae5bce1c127136a650ee25c4c78d3d334cc07859 (patch) | |
tree | 992edb0baaa4a6a4156fbfb77d4f6382cd3f5999 /src/ex_cmds.c | |
parent | 90cfdbe040320952e6b542d0633987f082b0f158 (diff) | |
download | vim-git-ae5bce1c127136a650ee25c4c78d3d334cc07859.tar.gz |
updated for version 7.0130v7.0130
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 4b7d6fd46..52104f41c 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -425,6 +425,11 @@ ex_sort(eap) nrs[lnum - eap->line1].col_nr = col; nrs[lnum - eap->line1].lnum = lnum; + + if (regmatch.regprog != NULL) + fast_breakcheck(); + if (got_int) + goto theend; } /* Allocate a buffer that can hold the longest line. */ @@ -432,7 +437,7 @@ ex_sort(eap) if (sortbuf == NULL) goto theend; - /* sort the array of line numbers */ + /* Sort the array of line numbers. Note: can't be interrupted! */ qsort((void *)nrs, count, sizeof(sorti_T), sort_compare); /* Insert the lines in the sorted order below the last one. */ @@ -448,6 +453,9 @@ ex_sort(eap) if (unique) STRCPY(sortbuf, s); } + fast_breakcheck(); + if (got_int) + goto theend; } /* delete the original lines if appending worked */ @@ -472,6 +480,8 @@ theend: vim_free(nrs); vim_free(sortbuf); vim_free(regmatch.regprog); + if (got_int) + EMSG(_(e_interr)); } /* |