Mercurial > vim
comparison src/ex_cmds2.c @ 16738:b52ea9c5f1db v8.1.1371
patch 8.1.1371: cannot recover from a swap file
commit https://github.com/vim/vim/commit/99499b1c05f85f83876b828eea3f6e14f0f407b4
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 23 21:35:48 2019 +0200
patch 8.1.1371: cannot recover from a swap file
Problem: Cannot recover from a swap file.
Solution: Do not expand environment variables in the swap file name.
Do not check the extension when we already know a file is a swap
file. (Ken Takata, closes 4415, closes #4369)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 23 May 2019 21:45:07 +0200 |
parents | 19ca17f9e155 |
children | ef00b6bc186b |
comparison
equal
deleted
inserted
replaced
16737:e56018f01ba7 | 16738:b52ea9c5f1db |
---|---|
1713 || (win->w_buffer->b_fnum | 1713 || (win->w_buffer->b_fnum |
1714 != WARGLIST(win)[win->w_arg_idx].ae_fnum | 1714 != WARGLIST(win)[win->w_arg_idx].ae_fnum |
1715 && (win->w_buffer->b_ffname == NULL | 1715 && (win->w_buffer->b_ffname == NULL |
1716 || !(fullpathcmp( | 1716 || !(fullpathcmp( |
1717 alist_name(&WARGLIST(win)[win->w_arg_idx]), | 1717 alist_name(&WARGLIST(win)[win->w_arg_idx]), |
1718 win->w_buffer->b_ffname, TRUE) & FPC_SAME)))); | 1718 win->w_buffer->b_ffname, TRUE, TRUE) & FPC_SAME)))); |
1719 } | 1719 } |
1720 | 1720 |
1721 /* | 1721 /* |
1722 * Check if window "win" is editing the w_arg_idx file in its argument list. | 1722 * Check if window "win" is editing the w_arg_idx file in its argument list. |
1723 */ | 1723 */ |
1735 && GARGCOUNT > 0 | 1735 && GARGCOUNT > 0 |
1736 && win->w_arg_idx < GARGCOUNT | 1736 && win->w_arg_idx < GARGCOUNT |
1737 && (win->w_buffer->b_fnum == GARGLIST[GARGCOUNT - 1].ae_fnum | 1737 && (win->w_buffer->b_fnum == GARGLIST[GARGCOUNT - 1].ae_fnum |
1738 || (win->w_buffer->b_ffname != NULL | 1738 || (win->w_buffer->b_ffname != NULL |
1739 && (fullpathcmp(alist_name(&GARGLIST[GARGCOUNT - 1]), | 1739 && (fullpathcmp(alist_name(&GARGLIST[GARGCOUNT - 1]), |
1740 win->w_buffer->b_ffname, TRUE) & FPC_SAME)))) | 1740 win->w_buffer->b_ffname, TRUE, TRUE) & FPC_SAME)))) |
1741 arg_had_last = TRUE; | 1741 arg_had_last = TRUE; |
1742 } | 1742 } |
1743 else | 1743 else |
1744 { | 1744 { |
1745 /* We are editing the current entry in the argument list. | 1745 /* We are editing the current entry in the argument list. |