Add name lookup on caret position change and solve tag formatting bug on specific batch deletion cases