Skip to content

Conversation

@blueyed
Copy link
Contributor

@blueyed blueyed commented Sep 30, 2017

No description provided.

let name = split(cols[-1], '=')[-1]
if name[0:8] ==# 'coverage_'
let id = split(cols[-2], '=')[-1]
let id = s:sign_id
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is id here immediately overwritten?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch.. will have to look into it.

for s in signs
let cols = split(s)
let name = split(cols[-1], '=')[-1]
if name[0:8] ==# 'coverage_'
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you use maktaba#string#StartsWith(l:name, 'coverage_') vs. hard-coded indexes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I think this it is not necessare to use a helper method in this case, but was not aware of it.

if has_key(s:visible, expand('%:p'))
execute 'sign unplace * file=' . expand('%:p')
" Unplace our signs for the current file.
let fname = bufname('%')
Copy link
Contributor

Choose a reason for hiding this comment

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

Helpers for programmatically listing and unplacing signs would be great to have in maktaba (see google/vim-maktaba#142). Consider splitting them out as standalone helper functions so they're easier to migrate over.

blueyed referenced this pull request in alfredodeza/coveragepy.vim Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants