def update(self, view): if view is None: return window = view.window() if window is None: return if not self.initialized: setup(window.hwnd()) with open('font_name.txt', 'wb') as f: f.write(view.settings().get('font_face', '').encode('utf-8')) self.initialized = True id = window.id() if id not in self.layouts: self.layouts[id] = WindowLayout(window) pos = self.layouts[id].calc_cursor_position(view, view.sel()[0].b) globalhook.set_inline_position(window.hwnd(), *pos)
def set_pos_st3(hwnd, pos): globalhook.set_inline_position(hwnd, *pos)