oni icon indicating copy to clipboard operation
oni copied to clipboard

sneak mode selection in the sidebar is shifted by one

Open magopian opened this issue 7 years ago • 3 comments

When in sneak mode, it seems the labels for the sidebar entries are shifted by one: when I enter the label of an entry, it's actually the entry above that is activated.

See the following two screenshots:

Entering sneak mode: screen shot 2018-02-14 at 09 29 35

Select "AV" to open the src folder: it's the file above exact-dependencies.json which is opened: screen shot 2018-02-14 at 09 29 50

If I deliberately use the label below the one I'm interested in, it does open the entry I'm looking for.

There's something weird though: if I select the very first entry in the sidebar, it pops up "not implemented yet", exactly as if I clicked on the first line (the path) in the explorer. Also, it seems there's one label displayed in front of an empty line at the end of the list... as if the whole list was shifted down by one.

I've tried the other labels (switching to the file or search panes from the leftmost sidebar, switching tabs) and they all seem to behave normally.

I'm using the latest released version 0.3.0 and neovim 0.2.2, and my config.js file is as follows:

// For more information on customizing Oni,
// check out our wiki page:
// https://github.com/onivim/oni/wiki/Configuration

const activate = oni => {
    console.log("config activated")

    // Input
    //
    // Add input bindings here:
    //
    oni.input.bind("<c-enter>", () => console.log("Control+Enter was pressed"))

    //
    // Or remove the default bindings here by uncommenting the below line:
    //
    // oni.input.unbind("<c-p>")
}

const deactivate = () => {
    console.log("config deactivated")
}

module.exports = {
    activate,
    deactivate,
    //add custom config here, such as

    "ui.colorscheme": "nord",

    //"oni.useDefaultConfig": true,
    //"oni.bookmarks": ["~/Documents"],
    "oni.loadInitVim": "~/.oni/init.vim",
    //"editor.fontSize": "14px",
    //"editor.fontFamily": "Monaco"

    // UI customizations
    "ui.animations.enabled": true,
    "ui.fontSmoothing": "auto",
}

And my init.vim file is:

set ruler  " show the cursor position all the time
set showcmd  " display incomplete commands
set ignorecase  " case insensitive searches
set smartcase  " case sensitive searches if there's an uppercase letter
map <F2> :nohlsearch<cr>  " disable the highlighted searches
imap <F2> :nohlsearch<cr>

" visual indication of the 80 char column
set colorcolumn=80

" visual indication of trailing and non-breaking spaces
set list

" move through tabs with CTRL+h and CTRL+l
map <C-h> :bprevious<cr>
map <C-l> :bnext<cr>
imap <C-h> <Esc>:bprevious<cr>
imap <C-l> <Esc>:bnext<cr>

" colorscheme wombat  " wombat is saved in .vim/colors/wombat.vim

" gundo: https://github.com/sjl/gundo.vim
nnoremap <F6> :GundoToggle<CR>
let g:gundo_preview_bottom = 1  " preview changes below the current windows, using full width

let mapleader=","

"ale
let g:ale_fixers = {
\   'javascript': [
\       'prettier', 'eslint',
\   ],
\   'elm': [
\       'format',
\   ],
\   'rust': [
\       'rustfmt',
\   ],
\   'reason': [
\       'refmt',
\   ],
\}
let g:ale_linters = {'rust': ['cargo']}
let g:ale_fix_on_save = 1
nmap <silent> <C-k> <Plug>(ale_previous_wrap)
nmap <silent> <C-j> <Plug>(ale_next_wrap)

magopian avatar Feb 14 '18 08:02 magopian

Thanks @magopian ! Really appreciate all the details you included, very helpful.

I actually hit this as well while I was working on demo / videos. Definitely annoying... and would be nice to have this covered via automation too. The explorer is one of the main places where the 'sneak mode' could be useful right now, but unfortunately its busted due to this.

bryphe avatar Feb 14 '18 17:02 bryphe

bump

dixler avatar Jun 28 '18 20:06 dixler

This is still happening on Oni 0.3.9, at leas on OSx

danielo515 avatar Feb 24 '19 09:02 danielo515