aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt11
-rw-r--r--src/nvim/eval.c2
2 files changed, 7 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b6ba45820..98a32a116b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -487,18 +487,19 @@ include(LuaHelpers)
set(LUA_DEPENDENCIES lpeg mpack bit)
if(NOT LUA_PRG)
foreach(CURRENT_LUA_PRG luajit lua5.1 lua5.2 lua)
- # If LUA_PRG is set find_program() will not search
- unset(LUA_PRG CACHE)
+ unset(_CHECK_LUA_PRG CACHE)
unset(LUA_PRG_WORKS)
- find_program(LUA_PRG ${CURRENT_LUA_PRG})
+ find_program(_CHECK_LUA_PRG ${CURRENT_LUA_PRG})
- if(LUA_PRG)
- check_lua_deps(${LUA_PRG} "${LUA_DEPENDENCIES}" LUA_PRG_WORKS)
+ if(_CHECK_LUA_PRG)
+ check_lua_deps(${_CHECK_LUA_PRG} "${LUA_DEPENDENCIES}" LUA_PRG_WORKS)
if(LUA_PRG_WORKS)
+ set(LUA_PRG "${_CHECK_LUA_PRG}" CACHE FILEPATH "Path to a program.")
break()
endif()
endif()
endforeach()
+ unset(_CHECK_LUA_PRG CACHE)
else()
check_lua_deps(${LUA_PRG} "${LUA_DEPENDENCIES}" LUA_PRG_WORKS)
endif()
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index c18d687cc1..7d641f1295 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -21889,7 +21889,7 @@ ret_free:
if (show_block) {
ui_ext_cmdline_block_leave();
}
-}
+} // NOLINT(readability/fn_size)
/// Get a function name, translating "<SID>" and "<SNR>".
/// Also handles a Funcref in a List or Dictionary.