Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splice fails to load if any input file is missing #23

Open
srathbun opened this issue Feb 19, 2014 · 1 comment
Open

Splice fails to load if any input file is missing #23

srathbun opened this issue Feb 19, 2014 · 1 comment

Comments

@srathbun
Copy link

Attempting to open splice with less than four input files results in the following traceback:

"README.markdown" 18L, 672C
Error detected while processing function splice#SpliceInit:
line    2:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/srathbun/.vim/bundle/splice/autoload/splice.py", line 13, in <module>
    import splicelib.init as splice
  File "/Users/srathbun/.vim/bundle/splice/autoload/splicelib/init.py", line 2, in <module>
    import modes
  File "/Users/srathbun/.vim/bundle/splice/autoload/splicelib/modes.py", line 893, in <module>
    loupe = LoupeMode()
  File "/Users/srathbun/.vim/bundle/splice/autoload/splicelib/modes.py", line 433, in __init__
    self._current_buffer = buffers.result
  File "/Users/srathbun/.vim/bundle/splice/autoload/splicelib/util/bufferlib.py", line 52, in result
    return Buffer(4)
  File "/Users/srathbun/.vim/bundle/splice/autoload/splicelib/util/bufferlib.py", line 14, in __init__
    self.name = self._buffer.name
AttributeError: 'Buffer' object has no attribute '_buffer'
line    3:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'SpliceInit' is not defined

This also happens if you have four input files, but some of them are the same file.

Placing a print statement in the init method for buffer shows that the first buffer created is 4, and if there are less than 4 vim buffers, none are matched and the _buffer property is never defined.

@errael
Copy link

errael commented Jul 17, 2024

Hi @srathbun,

I've just released Splice9; it's pure vim9script, no python; it's compatible with the original Splice with additional features, particularly UI. I've addressed some issues against the original Splice (see below) and I'm wondering about this issue.

What are the expectations when there are missing input files? Proper error message then exit? Difftool mode?

Feature: #30, #15, errael/splice9#16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants