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 GetSID() when there's no W mapping, and refactor it to make it simpler. #37

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@inkarkat
Contributor

inkarkat commented Jul 21, 2014

No description provided.

inkarkat added some commits Jul 21, 2014

FIX: Avoid GetSID() error when no W mapping.
With :let g:csv_nomap_w = 1, no "W" mapping exists, and the maparg() lookup of the SID fails.
Add a fallback to the alternative algorithm using <sfile>.
Refactoring: Replace s:GetSID() with a cached s:SID value.
As the script's SID is fixed, it needs to be determined only once during sourcing. Remove the version-dependent algorithm that is using maparg(), as this won't work during sourcing. This makes the script simpler and more robust by trading one persisted Integer for runtime function calls.
@chrisbra

This comment has been minimized.

Show comment
Hide comment
@chrisbra

chrisbra Jul 21, 2014

Owner

Thanks!

Owner

chrisbra commented Jul 21, 2014

Thanks!

@chrisbra

This comment has been minimized.

Show comment
Hide comment
@chrisbra

chrisbra Jul 21, 2014

Owner

merged

Owner

chrisbra commented Jul 21, 2014

merged

@chrisbra chrisbra closed this Jul 21, 2014

vim-scripts added a commit to vim-scripts/csv.vim that referenced this pull request Jan 16, 2015

Version 31
- fix that H on the very first cell, results in an endless loop (chrisbra/csv.vim#31, reported by lahvak, thanks!)- fix that count for |AddColumn| did not work (according to the documentation) (chrisbra/csv.vim#32, reported by lahvak, thanks!)- invalid reference to a WarningMsg() function- WhatColumn! error, if the first line did not contain as many fields as the line to check.- Rename |:Table| command to |:CSVTable| ( chrisbra/csv.vim#33, reported by Peter Jaros, thanks!)- Mention to escape special characters when manually specifying the delimiter. chrisbra/csv.vim#35), also detect '^' as delimiter.- Csv fixed with columns better use '\%v' to match columns, otherwise, one could get problems with multibyte chars- Sorting should work better with csv fixed with patterns (could generate an inavlide pattern before)- Refactor GetSID() (provided by Ingo Karkat chrisbra/csv.vim#37, thanks!)- New public function |CSVSum()|- Restrict |csv-arrange-autocmd| to specific file sizes (suggested by Spencer Boucher in chrisbra/csv.vim#39, thanks!)- Make |:CSVSearchInColumn| wrap pattern in '%\(..\)' pairs, so it works correctly with '\|' atoms- Small improvements on |:CSVTable| and |:NewDelimiter| command- <Up> and <Down> should skip folds (like in normal Vi mode, suggested by  Kamaraju Kusuma, thanks!)(automatically uploaded)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment