Logo
Explore Help
Sign In
itdominator/Python-With-Gtk-Template
Template
1
0
Fork 0
You've already forked Python-With-Gtk-Template
Code Issues Pull Requests Projects Releases Wiki Activity
Files
develop
Python-With-Gtk-Template/plugins/code/commands/nanoesq_temp_buffer/helpers.py

25 lines
565 B
Python
Raw Permalink Normal View History

refactor(code): move temp cut buffer feature and clean up related code - Moved cut_to_temp_buffer and paste_temp_buffer commands to plugin - Remove temporary cut buffer logic from SourceView - Remove related keybindings (Ctrl+K / Ctrl+U) - Fix word-end detection in ProviderResponseCacheBase to avoid extending past line end - Improve completion controller to support RequestCompletionEvent with optional provider filtering - Add GetActiveViewEvent handling in SourceViewsController - Ensure view scrolls to cursor after buffer switch via GLib.idle_add - Emit focus-in-event after DnD file load to restore focus behavior - Prevent "buffer" pseudo-path from interfering with loaded file filtering - Remove obsolete AGENTS.md from LSP manager plugin
2026-03-08 14:57:19 -05:00
# Python imports
# Lib imports
import gi
from gi.repository import GLib
# Application imports
def clear_temp_cut_buffer_delayed(view: any):
if not hasattr(view, "_cut_temp_timeout_id"): return
if not view._cut_temp_timeout_id: return
GLib.source_remove(view._cut_temp_timeout_id)
def set_temp_cut_buffer_delayed(view: any):
def clear_temp_buffer(view: any):
view._cut_buffer = ""
view._cut_temp_timeout_id = None
return False
view._cut_temp_timeout_id = GLib.timeout_add(15000, clear_temp_buffer, view)
Reference in New Issue Copy Permalink
Powered by Gitea
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API