Skip to content

docs(readme): reflow tables and wrapped lines - #19

Merged
vladdoster merged 1 commit into
masterfrom
docs/format-readmes
Sep 26, 2026
Merged

vladdoster merged 1 commit into
masterfrom
docs/format-readmes

Conversation

@vladdoster

Copy link
Copy Markdown
Owner

Reflow the version table in README.md and rewrap one bullet in tests/README.md. No code changes.

Related issue(s)

None.

Usage examples

git diff master -- README.md tests/README.md

How has this been tested?

Rendered both Markdown files and checked the table and bullet display correctly.

Types of changes

  • Breaking change
  • Bug fix
  • Documentation
  • New feature

Signed-off-by: Vladislav Doster <mvdoster@gmail.com>
@vladdoster
vladdoster merged commit 4432fa6 into master Sep 26, 2026
1 check passed
@vladdoster
vladdoster deleted the docs/format-readmes branch September 26, 2026 23:26
@github-actions

Copy link
Copy Markdown

📊 Test Coverage Report

Overall Coverage: 96.77%

📋 Detailed Coverage Report
==============================================================================
lua/remember.lua
==============================================================================
     --
     -- Author: vladdoster <mvdoster@gmail.com>
     -- Version: 1.5.1
     --
     -- Based on https://github.com/farmergreg/vim-lastplace/
     --
     -- This work is licensed under the terms of the MIT license.
     -- For a copy, see <https://opensource.org/licenses/MIT>.
     --

  21 local bo = vim.bo
  21 local fn = vim.fn
  21 local api = vim.api
  21 local cmd = vim.cmd

  21 local M = {}

  21 local config = {
  21   ignore_filetype = { "gitcommit", "gitrebase", "svn", "hgcommit", "dap-repl" },
  21   ignore_buftype = { "quickfix", "nofile", "help" },
  21   open_folds = true,
  21   dont_center = false,
     }

  21 local ctrl_e = api.nvim_replace_termcodes("<c-e>", true, false, true)

     -- Errors reported so far, so a persistent failure is shown once, not on every buffer
  21 local reported = {}

     local function contains(list, value)
 201   for _, item in pairs(list) do
 163     if item == value then
  10       return true
         end
       end
  38   return false
     end

  21 function M.setup(options)
   8   if options["ignore_filetype"] then
   2     config["ignore_filetype"] = options["ignore_filetype"]
       end

   8   if options["ignore_buftype"] then
   2     config["ignore_buftype"] = options["ignore_buftype"]
       end

   8   if options["open_folds"] ~= nil then
   3     config["open_folds"] = options["open_folds"]
       end

   8   if options["dont_center"] ~= nil then
   3     config["dont_center"] = options["dont_center"]
       end
     end

     local function restore_cursor()
       -- Return if we have a buffer or filetype we want to ignore
  26   if contains(config["ignore_buftype"], bo.buftype) or contains(config["ignore_filetype"], bo.filetype) then
  10     return
       end

       -- Return if the file doesn't exist, like a new and unsaved file. The name is
       -- tested literally because glob() would parse characters like "[" as a pattern
  16   if fn.filereadable(api.nvim_buf_get_name(0)) == 0 then
   2     return
       end

  14   local cursor_position = api.nvim_buf_get_mark(0, '"')
  11   local row = cursor_position[1]
  11   local line_count = api.nvim_buf_line_count(0)

       -- If the saved row is less than the number of rows in the buffer,
       -- then continue
  11   if row > 0 and row <= line_count then
   9     local last_visible_row = fn.line("w$")

         -- If the last row is visible within this window, like in a very short
         -- file, or user requested us not centering the screen, just set the cursor
         -- position to the saved position
   9     if line_count == last_visible_row or config["dont_center"] then
   3       api.nvim_win_set_cursor(0, cursor_position)

           -- If we're in the middle of the file, set the cursor position and center
           -- the screen
   6     elseif line_count - row > ((last_visible_row - fn.line("w0")) / 2) - 1 then
   5       api.nvim_win_set_cursor(0, cursor_position)
   5       cmd("norm! zz")

           -- If we're at the end of the screen, set the cursor position and move
           -- the window up by one with C-e. This is to show that we are at the end
           -- of the file. If we did "zz" half the screen would be blank.
         else
   1       api.nvim_win_set_cursor(0, cursor_position)
   1       cmd("norm! " .. ctrl_e)
         end
       end

       -- If the row is within a fold, make the row visible and recenter the screen
  11   if config["open_folds"] and fn.foldclosed(".") ~= -1 then
   1     cmd("norm! zvzz")
       end
     end

  21 function M.set_cursor_position()
  26   local success, err = pcall(restore_cursor)
  26   if success then
  23     return
       end

       -- A Ctrl-C must still abort the command that triggered BufWinEnter
   3   local reason = tostring(err)
   3   if reason:find("Keyboard interrupt", 1, true) then
   1     error(err, 0)
       end

   2   if reported[reason] then
   1     return
       end
   1   reported[reason] = true

   1   local name = api.nvim_buf_get_name(0)
   1   if name == "" then
***0     name = "[No Name]"
       end
   1   local message = "remember.nvim: error setting cursor position in " .. name .. ": " .. reason
       -- Deferred because an error echoed inside the autocmd is rethrown into the
       -- command that triggered BufWinEnter, which breaks other plugins
   2   vim.schedule(function()
   1     vim.notify(message, vim.log.levels.ERROR)
       end)
     end

  42 api.nvim_create_autocmd({ "BufWinEnter" }, {
       callback = function()
***0     M.set_cursor_position()
       end,
     })

  21 return M

==============================================================================
Summary
==============================================================================

File             Hits Missed Coverage
-------------------------------------
lua/remember.lua 60   2      96.77%
-------------------------------------
Total            60   2      96.77%


Coverage report generated by luacov

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.5.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

1 participant