"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "app/py/cuda_emmet/__init__.py" between
CudaText-1.92.0.tar.gz and CudaText-1.93.0.tar.gz

About: CudaText is a cross-platform text editor (written in Lazarus).

__init__.py  (CudaText-1.92.0):__init__.py  (CudaText-1.93.0)
import os import os
import webbrowser import webbrowser
from cudatext import * from cudatext import *
from .proc_snip_insert import * from .proc_snip_insert import *
from .dlg_emmet import DialogEmmet
lexers_xml = ['XML', 'XML ^', 'XSL', 'XSLT'] lexers_xml = ['XML', 'XML ^', 'XSL', 'XSLT']
lexers_css = ['CSS', 'SCSS', 'SASS', 'Sass', 'Stylus', 'LESS'] lexers_css = ['CSS', 'SCSS', 'SASS', 'Sass', 'Stylus', 'LESS']
filename_help = os.path.join(os.path.dirname(__file__), 'help.html') filename_help = os.path.join(os.path.dirname(__file__), 'help.html')
def get_syntax(): def get_syntax():
lexer = ed.get_prop(PROP_LEXER_CARET) lexer = ed.get_prop(PROP_LEXER_CARET)
if lexer in lexers_xml: if lexer in lexers_xml:
skipping to change at line 72 skipping to change at line 73
break break
s = s[:n] + tabstop(cnt) + s[n+1:] s = s[:n] + tabstop(cnt) + s[n+1:]
cnt += 1 cnt += 1
return s return s
msg_status('Cannot expand Emmet abbreviation: '+abr) msg_status('Cannot expand Emmet abbreviation: '+abr)
class Command: class Command:
dlg = None
def profiles(self): def profiles(self):
n = dlg_menu(MENU_LIST, '\n'.join(profiles)) n = dlg_menu(MENU_LIST, '\n'.join(profiles))
if n is None: return if n is None: return
item = profiles[n] item = profiles[n]
ini_write(fn_ini, ini_section, ini_key_profile, item) ini_write(fn_ini, ini_section, ini_key_profile, item)
def help(self): def help(self):
webbrowser.open_new_tab('file://'+filename_help) webbrowser.open_new_tab('file://'+filename_help)
skipping to change at line 118 skipping to change at line 121
return return
text = do_expand_abbrev(abr) text = do_expand_abbrev(abr)
if not text: if not text:
return return
x0, y0, x1, y1 = ed.get_carets()[0] x0, y0, x1, y1 = ed.get_carets()[0]
xstart = max(0, x0-len(abr)) xstart = max(0, x0-len(abr))
do_insert_result(xstart, y0, x0, y0, text) do_insert_result(xstart, y0, x0, y0, text)
def insert_text_at_caret(self, text):
x0, y0, x1, y1 = ed.get_carets()[0]
xstart = x0
do_insert_result(xstart, y0, x0, y0, text)
def dialog(self):
if not self.dlg:
self.dlg = DialogEmmet(do_expand_abbrev, self.insert_text_at_caret)
self.dlg.show()
 End of changes. 3 change blocks. 
0 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)