otavioschwanck / arrow.nvim

Bookmark your files, separated by project, and quickly navigate through them.
Other
341 stars 16 forks source link

BUG - is on arrowfile check isnt working correctly #52

Closed Ajaymamtora closed 2 months ago

Ajaymamtora commented 2 months ago

This is the snippet for heirline

  local arrow_statusline = require("arrow.statusline")
  local arrow = {
    cond = arrow_statusline.is_on_arrow_file(),
    update = {
      "BufRead",
    },
    {
      provider = function()
        return "[" .. arrow_statusline.text_for_statusline_with_icons() .. "] "
      end,
      hl = { fg = colors.fg_01, bold = true },
    },
  }

When in arrow: Screenshot 2024-04-21 at 15 01 45

When in a saved file: Screenshot 2024-04-21 at 15 02 50

When in a completely new empty buffer: Screenshot 2024-04-21 at 15 03 10

is_on_arrow_file seems to return true when in a completely new buffer, but text_for_statusline_with_icons returns an empty string which according to the docs should only be true if not on an arrow file?

statusline.text_for_statusline() -- return the text to be shown in the statusline (the index if is on arrow or "" if not)

Ajaymamtora commented 2 months ago

It was condition not cond...