System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 660/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 442.19
Blender Version
Broken: version: 2.82 (sub 7), branch: master, commit date: 2020-03-12 05:06, hash: rB375c7dc4caf4
Worked: (optional)
Short description of error
I have simple script that prints bmesh vert.index - works ok.
But if user uses => View -> 'Frame selected' - numpad .
Then vert index is prints -1
Im using bm.verts.ensure_lookup_table() but it wont work when using frame selected and then running the script.
Exact steps for others to reproduce the error
a) use frame selected (numpad .) in mesh editmode
b) run script - in console you can see vert index is -1 but should be 5.
Seems to be happening in blender 2.83 too.
Simple blend file: