aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt46
-rw-r--r--cmake.config/config.h.in2
-rw-r--r--runtime/doc/news.txt4
-rwxr-xr-xsrc/nvim/CMakeLists.txt3
-rw-r--r--src/nvim/ui.c16
-rw-r--r--src/nvim/version.c4
6 files changed, 25 insertions, 50 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3f490fc83..cb5cb09595 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -498,34 +498,30 @@ if(MSGPACK_HAS_FLOAT32)
add_definitions(-DNVIM_MSGPACK_HAS_FLOAT32)
endif()
-option(FEAT_TUI "Enable the Terminal UI" ON)
-
-if(FEAT_TUI)
- find_package(UNIBILIUM 2.0 REQUIRED)
- include_directories(SYSTEM ${UNIBILIUM_INCLUDE_DIRS})
-
- list(APPEND CMAKE_REQUIRED_INCLUDES "${UNIBILIUM_INCLUDE_DIRS}")
- list(APPEND CMAKE_REQUIRED_LIBRARIES "${UNIBILIUM_LIBRARIES}")
- check_c_source_compiles("
- #include <unibilium.h>
-
- int
- main(void)
- {
- unibi_str_from_var(unibi_var_from_str(\"\"));
- return unibi_num_from_var(unibi_var_from_num(0));
- }
- " UNIBI_HAS_VAR_FROM)
- list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES "${UNIBILIUM_INCLUDE_DIRS}")
- list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES "${UNIBILIUM_LIBRARIES}")
- if(UNIBI_HAS_VAR_FROM)
- add_definitions(-DNVIM_UNIBI_HAS_VAR_FROM)
- endif()
+find_package(UNIBILIUM 2.0 REQUIRED)
+include_directories(SYSTEM ${UNIBILIUM_INCLUDE_DIRS})
+
+list(APPEND CMAKE_REQUIRED_INCLUDES "${UNIBILIUM_INCLUDE_DIRS}")
+list(APPEND CMAKE_REQUIRED_LIBRARIES "${UNIBILIUM_LIBRARIES}")
+check_c_source_compiles("
+#include <unibilium.h>
- find_package(LibTermkey 0.22 REQUIRED)
- include_directories(SYSTEM ${LIBTERMKEY_INCLUDE_DIRS})
+int
+main(void)
+{
+ unibi_str_from_var(unibi_var_from_str(\"\"));
+ return unibi_num_from_var(unibi_var_from_num(0));
+}
+" UNIBI_HAS_VAR_FROM)
+list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES "${UNIBILIUM_INCLUDE_DIRS}")
+list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES "${UNIBILIUM_LIBRARIES}")
+if(UNIBI_HAS_VAR_FROM)
+ add_definitions(-DNVIM_UNIBI_HAS_VAR_FROM)
endif()
+find_package(LibTermkey 0.22 REQUIRED)
+include_directories(SYSTEM ${LIBTERMKEY_INCLUDE_DIRS})
+
find_package(LIBVTERM 0.3 REQUIRED)
include_directories(SYSTEM ${LIBVTERM_INCLUDE_DIRS})
diff --git a/cmake.config/config.h.in b/cmake.config/config.h.in
index 59be83fb5e..283a1d0c47 100644
--- a/cmake.config/config.h.in
+++ b/cmake.config/config.h.in
@@ -56,8 +56,6 @@
#endif
#cmakedefine HAVE_FORKPTY
-#cmakedefine FEAT_TUI
-
#ifndef UNIT_TESTING
#cmakedefine LOG_LIST_ACTIONS
#endif
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index f5ebacdf98..25e753aaed 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -118,6 +118,10 @@ The following changes to existing APIs or features add new behavior.
thread was used). This is not supposed to be a visible change to the user,
but might be the cause of subtle changes of behavior and bugs.
+ Previously, the TUI could be disabled as a build time feature (+tui/-tui),
+ resulting in a nvim binary which only could be run headless or embedded
+ in an external process. As of this version, TUI is always avalibale.
+
==============================================================================
REMOVED FEATURES *news-removed*
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 92f75dbf75..6b92d0caa8 100755
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -110,9 +110,6 @@ foreach(subdir
viml
viml/parser
)
- if(${subdir} MATCHES "tui" AND NOT FEAT_TUI)
- continue()
- endif()
file(MAKE_DIRECTORY ${GENERATED_DIR}/${subdir})
file(MAKE_DIRECTORY ${GENERATED_INCLUDES_DIR}/${subdir})
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index f40d8b52ca..33c7d0c1fe 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -128,32 +128,16 @@ static UI *builtin_ui = NULL;
void ui_free_all_mem(void)
{
kv_destroy(call_buf);
-# ifdef FEAT_TUI
if (builtin_ui) {
tui_free_all_mem(builtin_ui);
builtin_ui = NULL;
}
-# endif
}
#endif
void ui_builtin_start(void)
{
-#ifdef FEAT_TUI
builtin_ui = tui_start();
-#else
- fprintf(stderr, "Nvim headless-mode started.\n");
- size_t len;
- char **addrs = server_address_list(&len);
- if (addrs != NULL) {
- fprintf(stderr, "Listening on:\n");
- for (size_t i = 0; i < len; i++) {
- fprintf(stderr, "\t%s\n", addrs[i]);
- }
- xfree(addrs);
- }
- fprintf(stderr, "Press CTRL+C to exit.\n");
-#endif
}
UI *ui_get_by_index(int idx)
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 98719fce4a..92122b2523 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -69,11 +69,7 @@ static char *features[] = {
"-iconv",
#endif
-#ifdef FEAT_TUI
"+tui",
-#else
- "-tui",
-#endif
NULL
};