aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/plugin/gui_shim.vim73
-rw-r--r--src/nvim/CMakeLists.txt2
-rw-r--r--third-party/CMakeLists.txt7
3 files changed, 77 insertions, 5 deletions
diff --git a/runtime/plugin/gui_shim.vim b/runtime/plugin/gui_shim.vim
new file mode 100644
index 0000000000..28d82eb1c7
--- /dev/null
+++ b/runtime/plugin/gui_shim.vim
@@ -0,0 +1,73 @@
+" A Neovim plugin that implements GUI helper commands
+if !has('win32') || !has('nvim') || exists('g:GuiLoaded')
+ finish
+endif
+let g:GuiLoaded = 1
+
+" A replacement for foreground()
+function! GuiForeground() abort
+ call rpcnotify(0, 'Gui', 'Foreground')
+endfunction
+
+" Set maximized state for GUI window (1 is enabled, 0 disabled)
+function! GuiWindowMaximized(enabled) abort
+ call rpcnotify(0, 'Gui', 'WindowMaximized', a:enabled)
+endfunction
+
+" Set fullscreen state for GUI window (1 is enabled, 0 disabled)
+function! GuiWindowFullScreen(enabled) abort
+ call rpcnotify(0, 'Gui', 'WindowFullScreen', a:enabled)
+endfunction
+
+" Set GUI font
+function! GuiFont(fname, ...) abort
+ let force = get(a:000, 0, 0)
+ call rpcnotify(0, 'Gui', 'Font', a:fname, force)
+endfunction
+
+" Set additional linespace
+function! GuiLinespace(height) abort
+ call rpcnotify(0, 'Gui', 'Linespace', a:height)
+endfunction
+
+" Configure mouse hide behaviour (1 is enabled, 0 disabled)
+function! GuiMousehide(enabled) abort
+ call rpcnotify(0, 'Gui', 'Mousehide', a:enabled)
+endfunction
+
+" The GuiFont command. For compatibility there is also Guifont
+function s:GuiFontCommand(fname, bang) abort
+ if a:fname ==# ''
+ if exists('g:GuiFont')
+ echo g:GuiFont
+ else
+ echo 'No GuiFont is set'
+ endif
+ else
+ call GuiFont(a:fname, a:bang ==# '!')
+ endif
+endfunction
+command! -nargs=? -bang Guifont call s:GuiFontCommand("<args>", "<bang>")
+command! -nargs=? -bang GuiFont call s:GuiFontCommand("<args>", "<bang>")
+
+function s:GuiLinespaceCommand(height) abort
+ if a:height ==# ''
+ if exists('g:GuiLinespace')
+ echo g:GuiLinespace
+ else
+ echo 'No GuiLinespace is set'
+ endif
+ else
+ call GuiLinespace(a:height)
+ endif
+endfunction
+command! -nargs=? GuiLinespace call s:GuiLinespaceCommand("<args>")
+
+" GuiDrop('file1', 'file2', ...) is similar to :drop file1 file2 ...
+" but it calls fnameescape() over all arguments
+function GuiDrop(...)
+ let l:fnames = deepcopy(a:000)
+ let l:args = map(l:fnames, 'fnameescape(v:val)')
+ exec 'drop '.join(l:args, ' ')
+ doautocmd BufEnter
+endfunction
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index b19a951d5b..df596ea3d6 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -312,6 +312,7 @@ if(WIN32)
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/windows_runtime_deps/platforms
COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/ca-bundle.crt" ${PROJECT_BINARY_DIR}/windows_runtime_deps/
+ COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/cat.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/
COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/curl.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/
COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/diff.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/
COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/tee.exe" ${PROJECT_BINARY_DIR}/windows_runtime_deps/
@@ -333,7 +334,6 @@ if(WIN32)
COMMAND ${CMAKE_COMMAND} -E copy "${DEPS_PREFIX}/bin/platforms/qwindows.dll" ${PROJECT_BINARY_DIR}/windows_runtime_deps/platforms/
)
-
add_dependencies(nvim_runtime_deps external_blobs)
endif()
diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt
index 1663843663..1810794ee9 100644
--- a/third-party/CMakeLists.txt
+++ b/third-party/CMakeLists.txt
@@ -121,8 +121,8 @@ set(GPERF_URL http://ftp.gnu.org/pub/gnu/gperf/gperf-3.0.4.tar.gz)
set(GPERF_SHA256 767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e)
# 7za.exe cat.exe curl.exe ca-bundle.crt diff.exe tee.exe tidy.exe xxd.exe
-set(WINTOOLS_URL https://github.com/neovim/deps/raw/5d23093c66d63a8777244ed84de727c26d3f7b79/opt/win32tools.zip)
-set(WINTOOLS_SHA256 40c7d1fbed47d8b1cf3b3cada6bfe0e0df06d99beb48775b4db27972d3ceafc1)
+set(WINTOOLS_URL https://github.com/neovim/deps/raw/2f9acbecf06365c10baa3c0087f34a54c9c6f949/opt/win32tools.zip)
+set(WINTOOLS_SHA256 8bfce7e3a365721a027ce842f2ec1cf878f1726233c215c05964aac07300798c)
set(WINGUI_URL https://github.com/equalsraf/neovim-qt/releases/download/v0.2.4/neovim-qt.zip)
set(WINGUI_SHA256 95bbc852b69b12d0ef962a8410522010b453ba70f36ea379c548558d16abc2e6)
@@ -187,8 +187,7 @@ if(WIN32)
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy win32yank.exe ${DEPS_INSTALL_DIR}/bin)
GetBinaryDep(TARGET wingui
- INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory bin ${DEPS_INSTALL_DIR}/bin
- COMMAND ${CMAKE_COMMAND} -E copy_directory share/nvim-qt/runtime ${DEPS_INSTALL_DIR}/share/nvim/runtime)
+ INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory bin ${DEPS_INSTALL_DIR}/bin)
include(TargetArch)
if("${TARGET_ARCH}" STREQUAL "X86_64")