1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 05:20:04 +08:00

Fix buffer API (#1451)

close #1449
This commit is contained in:
Wang Shidong 2018-03-03 14:43:15 +08:00 committed by GitHub
parent c580ac62ee
commit 47c12691a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,9 +70,9 @@ function! s:self.buf_set_lines(buffer, start, end, strict_indexing, replacement)
py import vim
py import string
if bufexists(a:buffer)
py bufnr = string.atoi(vim.eval("a:buffer"))
py start_line = string.atoi(vim.eval("a:start"))
py end_line = string.atoi(vim.eval("a:end"))
py bufnr = int(vim.eval("a:buffer"))
py start_line = int(vim.eval("a:start"))
py end_line = int(vim.eval("a:end"))
py lines = vim.eval("a:replacement")
py vim.buffers[bufnr][start_line:end_line] = lines
endif
@ -80,9 +80,9 @@ function! s:self.buf_set_lines(buffer, start, end, strict_indexing, replacement)
py3 import vim
py3 import string
if bufexists(a:buffer)
py3 bufnr = string.atoi(vim.eval("a:buffer"))
py3 start_line = string.atoi(vim.eval("a:start"))
py3 end_line = string.atoi(vim.eval("a:end"))
py3 bufnr = int(vim.eval("a:buffer"))
py3 start_line = int(vim.eval("a:start"))
py3 end_line = int(vim.eval("a:end"))
py3 lines = vim.eval("a:replacement")
py3 vim.buffers[bufnr][start_line:end_line] = lines
endif