mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Treat visual cursor on end-of-line as one behind
Like matchit. Fixes #36.
This commit is contained in:
@@ -304,6 +304,10 @@ function! s:get_delim(opts) " {{{1
|
||||
if l:cursorpos > 1 && l:insertmode
|
||||
let l:cursorpos -= 1
|
||||
endif
|
||||
if l:cursorpos > strlen(getline('.'))
|
||||
\ && stridx("vV\<c-v>", mode()) > -1
|
||||
let l:cursorpos -= 1
|
||||
endif
|
||||
|
||||
let s:invert_skip = 0
|
||||
|
||||
|
||||
21
test/issues/36/image_uploader.rb
Normal file
21
test/issues/36/image_uploader.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
return unless original_filename
|
||||
|
||||
if model && model.read_attribute(mounted_as).present?
|
||||
model.read_attribute(mounted_as)
|
||||
else
|
||||
"#{SecureRandom.hex(5)}.#{file.extension}"
|
||||
end
|
||||
end
|
||||
|
||||
def store_dir
|
||||
"u/#{model.user_id}/#{model.id}"
|
||||
end
|
||||
|
||||
def extension_whitelist
|
||||
%w[jpg jpeg png]
|
||||
end
|
||||
|
||||
version :thumb do
|
||||
process resize_to_fit: [150, 150]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user