Skip to content

Scrollview hides text at the end of a line #132

@lostl1ght

Description

@lostl1ght

Hello!

I'm not sure if it is a bug or not but the scrollbar hides text at the end of a line. Is there any way to wrap text before scrollbar?

Steps to reproduce

  • nvim -u min.lua
  • :e somefile.txt
  • Add a window or resize it so that text is wrapped.
  • Observe how letters at the end of a line are hidden behind the scrollbar (screenshot below).
Minimal config
local root = '/tmp/nvim'

for _, name in ipairs({ 'config', 'data', 'state', 'cache' }) do
  vim.env[('XDG_%s_HOME'):format(name:upper())] = root .. '/' .. name
end

local lazy_path = root .. '/plugins/lazy.nvim'
if not vim.uv.fs_stat(lazy_path) then
  vim.api.nvim_cmd({
    cmd = '!',
    args = {
      'git',
      'clone',
      '--filter=blob:none',
      '--single-branch',
      'https://github.com/folke/lazy.nvim.git',
      lazy_path,
    },
  }, {})
end
vim.opt.runtimepath:prepend(lazy_path)

local plugins = {
  { 'folke/lazy.nvim' },
  { 'rebelot/kanagawa.nvim' },
  -- plugins
  {
    'dstein64/nvim-scrollview',
    dependencies = { 'lewis6991/gitsigns.nvim', config = true },
    config = function()
      vim.cmd([[let g:scrollview_mode = 'proper']])
      require('scrollview.contrib.gitsigns').setup()
    end,
  },
}

vim.g.mapleader = ' '

require('lazy').setup(plugins, {
  root = root .. '/plugins',
})

vim.opt.termguicolors = true
vim.cmd({ cmd = 'colorscheme', args = { 'kanagawa' } })

Below the letters ex are hidden:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions