X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/7665325e833a60a9217f7e62c37069ef6b359d18..22cdb827da0e4f485a8c7ec5c3fd8b5c37391de5:/spec/indent/indent_spec.rb?ds=sidebyside diff --git a/spec/indent/indent_spec.rb b/spec/indent/indent_spec.rb index 400ec11..aa796df 100644 --- a/spec/indent/indent_spec.rb +++ b/spec/indent/indent_spec.rb @@ -685,3 +685,22 @@ describe "Compact multiline dict" do proposed_indent.should == 0 end end + +describe "Using O" do + before { vim.feedkeys 'iif foo:\' } + + it "respects autoindent" do + vim.feedkeys '1\\' + indent.should == shiftwidth + vim.feedkeys '\ko' + indent.should == shiftwidth + vim.feedkeys '\kO' + indent.should == shiftwidth + # Uses/keeps indent from line above + vim.feedkeys '\i2\O' + indent.should == shiftwidth + # Uses/keeps indent from line above + vim.feedkeys '\j\O' + indent.should == 0 + end +end