vi_motions.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:NeoVintageous 作者: NeoVintageous 项目源码 文件源码
def on_change(self, s):
        flags = self.calculate_flags()
        self.view.erase_regions('vi_inc_search')
        state = self.state
        occurrence = reverse_find_wrapping(self.view,
                                           term=s,
                                           start=0,
                                           end=self.view.sel()[0].b,
                                           flags=flags,
                                           times=state.count)
        if occurrence:
            if state.mode == modes.VISUAL:
                occurrence = Region(self.view.sel()[0].a, occurrence.a)

            self.view.add_regions('vi_inc_search', [occurrence], 'string.search', '', DRAW_NO_OUTLINE)

            if not self.view.visible_region().contains(occurrence):
                self.view.show(occurrence)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号