Mercurial > vim
comparison src/if_lua.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 | 06a137af96f8 |
children | e134ff00be57 |
comparison
equal
deleted
inserted
replaced
28808:0f0fed554cdc | 28809:d0241e74bfdb |
---|---|
947 if (l->lv_lock) | 947 if (l->lv_lock) |
948 luaL_error(L, "list is locked"); | 948 luaL_error(L, "list is locked"); |
949 li = list_find(l, n); | 949 li = list_find(l, n); |
950 if (li == NULL) | 950 if (li == NULL) |
951 { | 951 { |
952 if (!lua_isnil(L, 3)) | 952 if (!lua_isnil(L, 3)) |
953 { | 953 { |
954 typval_T v; | 954 typval_T v; |
955 luaV_checktypval(L, 3, &v, "inserting list item"); | 955 luaV_checktypval(L, 3, &v, "inserting list item"); |
956 if (list_insert_tv(l, &v, li) == FAIL) | 956 if (list_insert_tv(l, &v, li) == FAIL) |
957 luaL_error(L, "failed to add item to list"); | 957 luaL_error(L, "failed to add item to list"); |
958 clear_tv(&v); | 958 clear_tv(&v); |
959 } | 959 } |
960 } | 960 } |
961 else | 961 else |
962 { | 962 { |
963 if (lua_isnil(L, 3)) // remove? | 963 if (lua_isnil(L, 3)) // remove? |
964 { | 964 { |
965 vimlist_remove(l, li, li); | 965 vimlist_remove(l, li, li); |
966 listitem_free(l, li); | 966 listitem_free(l, li); |
967 } | 967 } |
968 else | 968 else |
969 { | 969 { |
970 typval_T v; | 970 typval_T v; |
971 luaV_checktypval(L, 3, &v, "setting list item"); | 971 luaV_checktypval(L, 3, &v, "setting list item"); |
972 clear_tv(&li->li_tv); | 972 clear_tv(&li->li_tv); |
973 li->li_tv = v; | 973 li->li_tv = v; |
974 } | 974 } |
975 } | 975 } |
976 return 0; | 976 return 0; |
977 } | 977 } |
978 | 978 |
979 static int | 979 static int |