Mercurial > vim
comparison src/evalwindow.c @ 28809:d0241e74bfdb v8.2.4928
patch 8.2.4928: various white space and cosmetic mistakes
Commit: https://github.com/vim/vim/commit/6ed545e79735f23ff8e650bc2f0967e5a0baedc9
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 9 20:09:23 2022 +0100
patch 8.2.4928: various white space and cosmetic mistakes
Problem: Various white space and cosmetic mistakes.
Solution: Change spaces to tabs, improve comments.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 09 May 2022 21:15:04 +0200 |
parents | 39df510f97c3 |
children | 755ab148288b |
comparison
equal
deleted
inserted
replaced
28808:0f0fed554cdc | 28809:d0241e74bfdb |
---|---|
153 list_append_number(list, wp->w_id); | 153 list_append_number(list, wp->w_id); |
154 } | 154 } |
155 | 155 |
156 /* | 156 /* |
157 * Find window specified by "vp" in tabpage "tp". | 157 * Find window specified by "vp" in tabpage "tp". |
158 * Returns current window if "vp" is number zero. | |
159 * Returns NULL if not found. | |
158 */ | 160 */ |
159 win_T * | 161 win_T * |
160 find_win_by_nr( | 162 find_win_by_nr( |
161 typval_T *vp, | 163 typval_T *vp, |
162 tabpage_T *tp) // NULL for current tab page | 164 tabpage_T *tp) // NULL for current tab page |
995 | 997 |
996 if (wp == NULL || targetwin == NULL || wp == targetwin | 998 if (wp == NULL || targetwin == NULL || wp == targetwin |
997 || !win_valid(wp) || !win_valid(targetwin) | 999 || !win_valid(wp) || !win_valid(targetwin) |
998 || win_valid_popup(wp) || win_valid_popup(targetwin)) | 1000 || win_valid_popup(wp) || win_valid_popup(targetwin)) |
999 { | 1001 { |
1000 emsg(_(e_invalid_window_number)); | 1002 emsg(_(e_invalid_window_number)); |
1001 rettv->vval.v_number = -1; | 1003 rettv->vval.v_number = -1; |
1002 return; | 1004 return; |
1003 } | 1005 } |
1004 | 1006 |
1005 if (argvars[2].v_type != VAR_UNKNOWN) | 1007 if (argvars[2].v_type != VAR_UNKNOWN) |
1006 { | 1008 { |
1007 dict_T *d; | 1009 dict_T *d; |
1008 dictitem_T *di; | 1010 dictitem_T *di; |
1009 | 1011 |
1010 if (argvars[2].v_type != VAR_DICT || argvars[2].vval.v_dict == NULL) | 1012 if (argvars[2].v_type != VAR_DICT || argvars[2].vval.v_dict == NULL) |
1011 { | 1013 { |
1012 emsg(_(e_invalid_argument)); | 1014 emsg(_(e_invalid_argument)); |
1013 return; | 1015 return; |
1014 } | 1016 } |
1015 | 1017 |
1016 d = argvars[2].vval.v_dict; | 1018 d = argvars[2].vval.v_dict; |
1017 if (dict_get_bool(d, (char_u *)"vertical", FALSE)) | 1019 if (dict_get_bool(d, (char_u *)"vertical", FALSE)) |
1018 flags |= WSP_VERT; | 1020 flags |= WSP_VERT; |
1019 if ((di = dict_find(d, (char_u *)"rightbelow", -1)) != NULL) | 1021 if ((di = dict_find(d, (char_u *)"rightbelow", -1)) != NULL) |
1020 flags |= tv_get_bool(&di->di_tv) ? WSP_BELOW : WSP_ABOVE; | 1022 flags |= tv_get_bool(&di->di_tv) ? WSP_BELOW : WSP_ABOVE; |
1021 size = (int)dict_get_number(d, (char_u *)"size"); | 1023 size = (int)dict_get_number(d, (char_u *)"size"); |
1022 } | 1024 } |
1023 | 1025 |
1024 win_move_into_split(wp, targetwin, size, flags); | 1026 win_move_into_split(wp, targetwin, size, flags); |
1025 } | 1027 } |
1026 | 1028 |