Skip to main content
added 10 characters in body
Source Link
D. Ben Knoble
  • 27.7k
  • 3
  • 31
  • 68

This difference is pretty obvious:

BufEnter X:

It was bufnr() != X

But now it becomes bufnr() == X

  • BufEnter X:

BufWinEnter X:

  1. It was bufnr() != X
  2. But now it becomes bufnr() == X

It was len(win_findbuf(X)) == 0

  • BufWinEnter X:

But now it becomes len(win_findbuf(X)) == 1

  1. It was len(win_findbuf(X)) == 0
  2. But now it becomes len(win_findbuf(X)) == 1

This difference is pretty obvious:

BufEnter X:

It was bufnr() != X

But now it becomes bufnr() == X

BufWinEnter X:

It was len(win_findbuf(X)) == 0

But now it becomes len(win_findbuf(X)) == 1

This difference is pretty obvious:

  • BufEnter X:
  1. It was bufnr() != X
  2. But now it becomes bufnr() == X
  • BufWinEnter X:
  1. It was len(win_findbuf(X)) == 0
  2. But now it becomes len(win_findbuf(X)) == 1
Source Link
Matt
  • 21.6k
  • 1
  • 13
  • 25

This difference is pretty obvious:

BufEnter X:

It was bufnr() != X

But now it becomes bufnr() == X

BufWinEnter X:

It was len(win_findbuf(X)) == 0

But now it becomes len(win_findbuf(X)) == 1