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

fix: core modules are opened readonly #31

Closed
wants to merge 1 commit into from
Closed

fix: core modules are opened readonly #31

wants to merge 1 commit into from

Conversation

nfischer
Copy link

Core modules (that get downloaded via URL) are now opened in readonly mode.

Fixes #30

@moll
Copy link
Owner

moll commented Jan 12, 2016

<3

You reckon you can throw in a test for it, too? Thanks!

@nfischer
Copy link
Author

Sure! I'll take a look. Shouldn't be too hard.

Also, it looks like the CI failed, but it doesn't seem like it's due to my change. Perhaps it's a change in travis?

@moll
Copy link
Owner

moll commented Jan 12, 2016

Ugh, Travis. Why can't some things just remain as they are. -_- I'll get at it before merging. ;)

# it "must edit core modules in readonly mode" do
# Dir.mkdir File.join(@dir, "lib")
# $vim.edit File.join(@dir, "lib", "CHANGELOG.txt")
# $vim.command "Nedit fs"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote out this test, and although it passes (when I uncomment it), it seems to have side effects that cause 3 other tests to fail:

  1) Failure:
Autoloaded::Goto file#test_0017_must find when filetype is JavaScript and file new [/home/nate/programming/forks/vim-node/test/autoload_test.rb:186]:
--- expected
+++ actual
@@ -1 +1 @@
-"/tmp/d20160112-17778-1ru217k/node_modules/foo/index.js"
+"/tmp/d20160112-17778-1ru217k/index.js"


  2) Failure:
Autoloaded::Goto file with split#test_0001_must edit file in a new split [/home/nate/programming/forks/vim-node/test/autoload_test.rb:270]:
Expected: "1"
  Actual: "0"

  3) Failure:
Autoloaded::Goto file with tab#test_0001_must edit file in a new tab [/home/nate/programming/forks/vim-node/test/autoload_test.rb:286]:
Expected: "1"
  Actual: "0"

Any idea what the side effect could be, @moll? The other tests start passing if I uncomment the Nedit fs line.

Core modules (that get downloaded via URL) are now opened in readonly mode.

Fixes #30
@nfischer
Copy link
Author

Update: I realized the issue was I forget setlocal (readonly is local by default, modifiable is however not). I added the other test back in, and it all passes the unit tests for me (so this should be good to merge, once the CI is fixed).

I tried a couple things for travis, but couldn't figure out a solution. I'll open another issue for it and post what I had.

@nfischer nfischer mentioned this pull request Jan 13, 2016
@nfischer nfischer closed this Jul 2, 2018
@moll
Copy link
Owner

moll commented Jul 3, 2018

Hey, why'd you close it?

@nfischer
Copy link
Author

nfischer commented Jul 3, 2018

I don't intend to continue working on this PR. You may land a similar patch if you're interested. Thanks for an excellent plugin 🎉

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

Successfully merging this pull request may close these issues.

None yet

2 participants