Skip to content

Commit ceda451

Browse files
nicoraffovim-scripts
authored andcommitted
Version 0.6
* Fix GVim errors with non-english locale * No functional changes
1 parent dcb0551 commit ceda451

File tree

7 files changed

+46
-30
lines changed

7 files changed

+46
-30
lines changed

README.orig

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Conque - Interactive shell buffer for Vim
33

44
author: nico raffo <nicoraffo@gmail.com>
5-
modified: 2009-12-01
6-
version: 0.5
5+
modified: 2009-12-17
6+
version: 0.6
77
info: http://code.google.com/p/conque/
88

99
== REQUIREMENTS ==
@@ -20,7 +20,6 @@ $HOME/.vim/syntax/conque.vim
2020
$HOME/.vim/autoload/conque.vim
2121
$HOME/.vim/autoload/subprocess.vim
2222
$HOME/.vim/autoload/subprocess/proc_py.vim
23-
$HOME/.vim/autoload/subprocess/shell_translate.vim
2423

2524
== USAGE ==
2625

@@ -78,11 +77,7 @@ Most installations of Vim 7+ these days come built with Python.
7877

7978
== CHANGELOG ==
8079

81-
-0.5 / 2009-12-01
82-
* rewritten, faster escape sequece proecessing
83-
* bugfixes
84-
85-
- 0.4 / 2009-10-29
80+
- 0.4 / 2009-10-
8681
* Improved history and tab completion
8782
* Fix escape sequence formatting and improve highlighting
8883
* Send selected text to shell from any buffer

autoload/conque.vim

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
" FILE: autoload/conque.vim
22
" AUTHOR: Nico Raffo <nicoraffo@gmail.com>
3-
" MODIFIED: 2009-12-01
4-
" VERSION: 0.5, for Vim 7.0
3+
" Shougo Matsushita <Shougo.Matsu@gmail.com> (original VimShell)
4+
" Yukihiro Nakadaira (vimproc)
5+
" MODIFIED: 2009-12-17
6+
" VERSION: 0.6, for Vim 7.0
57
" LICENSE: {{{
68
" Conque - pty interaction in Vim
79
" Copyright (C) 2009 Nico Raffo
@@ -712,4 +714,5 @@ function! conque#send(command) "{{{
712714
call conque#run()
713715
endfunction "}}}
714716

717+
715718
" vim: foldmethod=marker

autoload/subprocess.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" FILE: autoload/subprocess.vim
22
" AUTHOR: Nico Raffo <nicoraffo@gmail.com>
3-
" MODIFIED: 2009-12-01
4-
" VERSION: 0.5, for Vim 7.0
3+
" MODIFIED: 2009-12-17
4+
" VERSION: 0.6, for Vim 7.0
55
" LICENSE: MIT License "{{{
66
" Permission is hereby granted, free of charge, to any person obtaining a copy
77
" of this software and associated documentation files (the "Software"), to deal

autoload/subprocess/proc_py.vim

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" FILE: autoload/subprocess/proc_py.vim
22
" AUTHOR: Nico Raffo <nicoraffo@gmail.com>
3-
" MODIFIED: 2009-12-01
4-
" VERSION: 0.5, for Vim 7.0
3+
" MODIFIED: 2009-12-17
4+
" VERSION: 0.6, for Vim 7.0
55
" LICENSE: MIT License "{{{
66
" Permission is hereby granted, free of charge, to any person obtaining a copy
77
" of this software and associated documentation files (the "Software"), to deal
@@ -48,7 +48,7 @@ function! s:lib.open(...) "{{{
4848
endfunction "}}}
4949

5050
function! s:lib.read(...) "{{{
51-
let timeout = get(a:000, 0, 0.2)
51+
let timeout = get(a:000, 0, '0.2')
5252
let b:proc_py_output = []
5353
silent execute ":python proc".b:subprocess_id.".read(" . string(timeout) . ")"
5454
return b:proc_py_output
@@ -82,6 +82,11 @@ function! s:lib.interrupt() "{{{
8282
silent execute ":python proc".b:subprocess_id.".interrupt()"
8383
endfunction "}}}
8484

85+
" Update window size in kernel
86+
function! s:lib.update_window_size(lines, cols) "{{{
87+
silent execute ":python proc" . b:subprocess_id . ".update_window_size(" . a:lines . "," . a:cols . ")"
88+
endfunction "}}}
89+
8590
" Am I alive?
8691
function! s:lib.get_status() "{{{
8792
let b:proc_py_status = 1
@@ -133,7 +138,7 @@ if sys.platform == 'win32' or sys.platform == 'win64':
133138
import popen2, stat
134139
use_pty = 0
135140
else:
136-
import pty, tty, select
141+
import pty, tty, select, fcntl, termios, struct
137142
use_pty = 1
138143

139144

@@ -347,20 +352,32 @@ class proc_py:
347352

348353
# XXX - ew
349354
def get_env_var(self, var_name): #{{{
350-
env_val = ''
351-
try:
352-
from ctypes import CDLL, c_char_p
353-
getenv = CDLL("libc.so.6").getenv
354-
getenv.restype = c_char_p
355-
env_val = getenv(var_name)
356-
except:
357-
env_val = os.environ[var_name]
355+
#env_val = ''
356+
#try:
357+
# from ctypes import CDLL, c_char_p
358+
# getenv = CDLL("libc.so.6").getenv
359+
# getenv.restype = c_char_p
360+
# env_val = getenv(var_name)
361+
#except:
362+
env_val = os.environ[var_name]
358363

359364
command = 'let b:proc_py_env = "' + env_val + '"'
360365
vim.command(command)
361366
# }}}
362367

363368

369+
# update window size in kernel, then send SIGWINCH to fg process
370+
def update_window_size(self, rows, cols): # {{{
371+
if use_pty:
372+
try:
373+
fcntl.ioctl(self.fd, termios.TIOCSWINSZ, struct.pack("HHHH", rows, cols, 0, 0))
374+
os.kill(self.pid, signal.SIGWINCH)
375+
except:
376+
pass
377+
378+
# }}}
379+
380+
364381

365382

366383
EOF

autoload/subprocess/shell_translate.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" FILE: autoload/subprocess/shell_translate.vim
22
" AUTHOR: Nico Raffo <nicoraffo@gmail.com>
3-
" MODIFIED: 2009-12-01
4-
" VERSION: 0.5, for Vim 7.0
3+
" MODIFIED: 2009-12-17
4+
" VERSION: 0.6, for Vim 7.0
55
" LICENSE: MIT License "{{{
66
" Permission is hereby granted, free of charge, to any person obtaining a copy
77
" of this software and associated documentation files (the "Software"), to deal
@@ -453,4 +453,5 @@ function! s:process_colors(color_changes) " {{{
453453
endfunction " }}}
454454

455455

456+
456457
" vim: foldmethod=marker

plugin/conque.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
" AUTHOR: Nico Raffo <nicoraffo@gmail.com>
33
" Shougo Matsushita <Shougo.Matsu@gmail.com> (original VimShell)
44
" Yukihiro Nakadaira (vimproc)
5-
" MODIFIED: 2009-12-01
6-
" VERSION: 0.5, for Vim 7.0
5+
" MODIFIED: 2009-12-17
6+
" VERSION: 0.6, for Vim 7.0
77
" LICENSE: {{{
88
" Conque - pty interaction in Vim
99
" Copyright (C) 2009 Nico Raffo

syntax/conque.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
" AUTHOR: Nico Raffo <nicoraffo@gmail.com>
33
" Shougo Matsushita <Shougo.Matsu@gmail.com> (original VimShell)
44
" Yukihiro Nakadaira (vimproc)
5-
" MODIFIED: 2009-12-01
6-
" VERSION: 0.5, for Vim 7.0
5+
" MODIFIED: 2009-12-17
6+
" VERSION: 0.6, for Vim 7.0
77
" LICENSE: {{{
88
" Conque - pty interaction in Vim
99
" Copyright (C) 2009 Nico Raffo

0 commit comments

Comments
 (0)