Skip to content

Conversation

@vais
Copy link
Contributor

@vais vais commented Mar 25, 2025

Fixes #299 and then some.

Thank you for creating this wonderful plugin, and thanks in advance for considering my changes.


return substitute(name, '^'.db_ui#utils#slug(a:db.name).'-', '', '')
endfunction

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All the code in the new render methods below is copied verbatum from the original if/elseif/endif above.

Copy link
Owner

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

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

Thanks!


" Default drawer sections and their order
if !exists('g:db_ui_drawer_sections')
let g:db_ui_drawer_sections = ['new_query', 'buffers', 'saved_queries', 'schemas']
Copy link
Owner

Choose a reason for hiding this comment

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

Let's add the default in plugin/db_ui.vim where other defaults are. This should also fix the tests.

Copy link
Owner

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

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

I missed the default variable value. Let's fix that and it's good to go.

@vais
Copy link
Contributor Author

vais commented Mar 26, 2025

My bad, @kristijanhusak, thanks for catching that!

I've now moved g:db_ui_drawer_sections initialization to plugin/db_ui.vim where all other globals are initialized. Please take a look, is that what you had in mind?

(There are still 5 failing tests, but they appear to be the same ones that fail on master)

Copy link
Owner

@kristijanhusak kristijanhusak left a comment

Choose a reason for hiding this comment

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

Thanks!

@kristijanhusak kristijanhusak merged commit a7ff54a into kristijanhusak:master Mar 26, 2025
12 checks passed
@vais vais deleted the db_ui_drawer_sections branch March 26, 2025 21:54
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.

Drawer cursor shifting by 2 lines when opening selected item

2 participants