-
Notifications
You must be signed in to change notification settings - Fork 9
Major fixes, among them windows file handling #44
base: master
Are you sure you want to change the base?
Conversation
|
You may also want to look at the panel commit I left out , which contains some of my preferences , but these are not strictly errors, so I left them out. |
|
|
||
|
|
||
| @property | ||
| def cur_buf(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate what issues you encountered. We already have a a gen_new_buf function called by on_bufenter, which should guarantee that all call to cur_buf to be valid.
| return '/'.join(sp).ljust(width) | ||
| else: | ||
| total += len(sp[i]) - 1 | ||
| return res[-1 * width:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose we never reach this point. Did you encounter any issue or did you see lsp warning? If it's the later, maybe it's ok to just return res?
|
|
||
| if sudo: | ||
| Vim.AsyncRun('sudo {} {} {}'.format(self.ServerCmd, cmd, fname), | ||
| Vim.AsyncRun('sudo {} {} {}'.format(self.ServerCmd, cmd, fname).replace('\\','\\\\'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to put the replace in Vim.AsyncRun
| term=True) | ||
| else: | ||
| Vim.AsyncRun('{} {} {}'.format(self.ServerCmd, cmd, fname), | ||
| Vim.AsyncRun('{} {} {}'.format(self.ServerCmd, cmd, fname).replace('\\','\\\\'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
|
|
||
| @classmethod | ||
| def cp(self, src_arr, dst, sudo=False, on_exit=None): | ||
| print("uuu",src_arr,dst) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove.
| @property | ||
| def cur_buf(self): | ||
| return self._bufs[Vim.current.buffer.number] | ||
| if Vim.current.buffer.number in self._bufs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you encounter a key not found error here?
Hi,
I solved here few errors, some of which I didn't create an issue.
curbuf handling was problematic in a way I don't fully remember. I think it threw an error about out of index of buffers. you probably saw it.
fixing issue #43, windows file operation not workingandfixing windows 1fixes windows file handling issue #43.It really solved FS operations in windows. The thing to note is that you do replace
\\with\\\\before calling vim commands , otherwise\\becomes\and it becomes magic.The silent thing is needed because of errors from time to time.
The missing return caused an error as well.