Skip to content

Commit 4fc8267

Browse files
committed
Change wineditline to version 2.205. Added patch by V.Spiritn, which fixes clipborad paste (PGPRO-1537)
1 parent 6dddad1 commit 4fc8267

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

build/helpers/dependencies.cmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ wget --no-check-certificate -c http://repo.l.postgrespro.ru/depends/wineditline-
7171
CD /D %DEPENDENCIES_SRC_DIR%
7272
7z x %DOWNLOADS_DIR%\wineditline-%EDITLINE_VER%.zip
7373
CD /D wineditline-%EDITLINE_VER%\src
74+
patch -p2 < %ROOT%/patches/wineditline/clipboard_paste.patch || goto :ERROR
7475
CL -I. -c history.c editline.c fn_complete.c || goto :ERROR
7576
LIB /out:edit.lib *.obj || goto :ERROR
7677
MKDIR %DEPENDENCIES_BIN_DIR%\wineditline

build/helpers/setvars.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SET OPENSSL_VER=1.0.2n
77
SET GETTEXT_VER=0.19.8
88
SET LIBSSH2_VER=1.6.0
99
SET WXWIDGETS_VER=3.0.2
10-
SET EDITLINE_VER=2.102
10+
SET EDITLINE_VER=2.205
1111
SET ZSTD_RELEASE=1.1.0
1212

1313
SET PG_REPACK_VER=1.4.2
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff --git a/src/editline.c b/src/editline.c
2+
index 27b3c80..008b234 100644
3+
--- a/src/editline.c
4+
+++ b/src/editline.c
5+
@@ -1113,7 +1113,14 @@ char *readline(const char *prompt)
6+
return NULL;
7+
}
8+
if (count) {
9+
- if ((irBuffer.EventType == KEY_EVENT) && irBuffer.Event.KeyEvent.bKeyDown) {
10+
+ if ((irBuffer.EventType == KEY_EVENT) /* && irBuffer.Event.KeyEvent.bKeyDown */) {
11+
+ if (!irBuffer.Event.KeyEvent.bKeyDown && irBuffer.Event.KeyEvent.wVirtualKeyCode != VK_MENU) {
12+
+ if (!ReadConsoleInput(_el_h_in, &irBuffer, 1, &count)) {
13+
+ _el_clean_exit();
14+
+ return NULL;
15+
+ }
16+
+ continue;
17+
+ }
18+
/*
19+
the user pressed a key
20+
*/

0 commit comments

Comments
 (0)