Skip to content

Commit

Permalink
to-github
Browse files Browse the repository at this point in the history
  • Loading branch information
HouQiming committed Mar 31, 2016
1 parent 8cffcf6 commit 260b38b
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion notebook.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"cells":[{"m_language":"Windows BAT","m_text_in":"@echo off\nrem build script for the project\njc --readable_c_code qpad.jc --run\n","m_text_out":"","m_cell_id":0,"m_completion_time":[2016,2,29,20,27,44,3],"m_has_any_error":0,"m_current_path":"c:/tp/pure/mo"},{"m_language":"Markdown","m_text_in":"# TODO LIST\nsmart current-tab-only repaint\n\tjust backup the tabs to an FBO\n\t\tdo it on the 2nd render\n\timplement the NeedUpdate callbacks\n\tregions!\nregexp folding: deal with already-escaped input\ngithub\n\treadme.md\nrunning a markdown: open as help page?\ndrag-out support\n\tsecondary windows\n\t\trendering works as is\n\t\tregion is mixed up\nmultiple windows of the same file\nfull notebook search\nruntime completion\n\tPython / node.js\n\tactually run an interpreter session and dump the \"require\"d objects to a file\n\t\tsecurity concerns...\nmaximizing notebooks\nfunction hint on *existing* calls - which parameter are you changing right now?\nindent\n\tauto detect space / tab indent\nplugin loading\nhelp\n\timage searching\n\tscript error notification\ndragging a window to occupy \"tips\" fully\ncode beautifier\n\thelp code auto beautification\n(test) proper FindClose for abandoned finder callbacks\nnotebook ctrl+m focus\ndiff / undo on reload\nAC plugins\n\ttex ref\n\tbash\n\tjs member name in certain strings\n\t--\n\tmulti-source combination\n\t\tsome candidates may smash a context\n\t\tput this in as a property of the candidates\ntentative focus refresh: infinite loop risk\nctrl+d at EOL\ndblclick at notebook eol\nporting\n\tlinux alt+tab\n\tlinux instance detection\n\t\tint pid_file = open(\"/var/run/whatever.pid\", O_CREAT | O_RDWR, 0666);\n\t\tint rc = flock(pid_file, LOCK_EX | LOCK_NB);\n\t\tif(rc) {\n\t\t if(EWOULDBLOCK == errno)\n\t\t ; // another instance is running\n\t\t}\n\t\telse {\n\t\t // this is the first instance\n\t\t}\n\tunix search path for jc\nmultiple tabs for the same file\n\tprivate sel / scroll\n\tuse circled numbers for id?\nctrl+mousewheel\n\tper-tab scale? make it global\nmouse centric interaction\n\ttoolbar in menu bar\nlocalization, theme\nctrl+g mode\n\tgoto button to trigger it on the tophint\n\tneed must-appear\nshort and simple theme color palette\nput plugins in ~/.qpad\nlinux\n\t\"make install\" package\nmake top hint / notification dodge \n\tMouseOver / cursor\nswap ctrl+shift+v and ctrl+v?\nbinary editor reloading?\nfor() is not a function\nfileindex gc vs parse queue\nmac\n\ttooltip hotkey translation, zoom hotkey\nmac application menu\nrendering\n\ttrue AA for roundrect\ngit diff viewer\nauto-include files\ntex\n\tport more of deferred.qpadscript\n\tenabling/disabling plugins in menu\nCJK PPM:\n\twork in conjunction with IME?\n\t\tcould have blind prediction...\n\tiphone prediction isn't that useful\nwin10 icon\nvery narrow file list...\nbad parser result after multiple saves\n\tcould be diff tracker bug\nbinary editor\n\tduk buffer size limit\nsavable text highlight\n\tlengthed bookmark\n\tuse shift+ctrl+q with sel to toggle\n\trender it in a style resembling \"left-side\" bookmarks\n\t--\n\tis it really needed?\n\tor general annotations\n\t\tbetter done as a git tool\ngeneric HTML rendering?\n\tcheerio - looks managable\n\tneed module conversion: npm to duktape\n\t\thttps://www.npmjs.com/package/node-uglifier\n\tdid it with browserify\n\tit magically works in duktape with a minor modification\n","m_text_out":"","m_cell_id":1,"m_has_any_error":0,"m_completion_time":[2016,1,11,22,42,45,5]},{"m_language":"Markdown","m_text_in":"Search result","m_text_out":"c:/tp/pure/mo/res/lib/code_editor.js:148051..148063: file_browser\nc:/tp/pure/mo/res/lib/code_editor.js:149493..149505: file_browser\nc:/tp/pure/mo/res/lib/code_editor.js:256679..256691: file_browser\nc:/tp/pure/mo/res/main.js:24544..24556: file_browser\nc:/tp/pure/mo/res/main.js:25376..25388: file_browser\n","m_has_any_error":1,"m_cell_id":2},{"m_language":"Windows BAT","m_text_in":"@echo off\nrem build script for 'c:/tp/pure/mo/qpad.jc'\ncd /d c:/tp/pure/mo\njc -brelease -awin64 c:/tp/pure/mo/qpad.jc\ncd bin\\win64_release\ndel qpad3beta_64.7z\n7z a qpad3beta_64.7z qpad.exe\ndel c:\\software\\cmder\\bin\\qpad_old.exe\nren c:\\software\\cmder\\bin\\qpad.exe qpad_old.exe\ncopy qpad.exe c:\\software\\cmder\\bin\\qpad.exe\n","m_text_out":"\r\n7-Zip [64] 15.14 : Copyright (c) 1999-2015 Igor Pavlov : 2015-12-31\r\n\r\nScanning the drive:\r\n1 file, 4526592 bytes (4421 KiB)\r\n\r\nCreating archive: qpad3beta_64.7z\r\n\r\nItems to compress: 1\r\n\r\n\r\nFiles read from disk: 1\r\nArchive size: 1604629 bytes (1568 KiB)\r\nEverything is Ok\r\n 1 file(s) copied.\r\n","m_cell_id":3,"m_has_any_error":0,"m_current_path":"c:/tp/pure/mo","m_completion_time":[2016,2,29,20,31,53,3]}]}
{"cells":[{"m_language":"Windows BAT","m_text_in":"@echo off\nrem build script for the project\njc --readable_c_code qpad.jc --run\n","m_text_out":"s7main.c\r\nstb_truetype.c\r\nstb_image.c\r\nsdl_timerw.c\r\nnfd_common.c\r\nnfd_win.cpp\r\nduktape.c\r\nspaprt_portable.c\r\naffentry.cxx\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\INCLUDE\\xlocale(336) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc\r\naffixmgr.cxx\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\INCLUDE\\xlocale(336) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc\r\ncsutil.cxx\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\INCLUDE\\xlocale(336) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc\r\ndictmgr.cxx\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\INCLUDE\\xlocale(336) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc\r\nfilemgr.cxx\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\INCLUDE\\xlocale(336) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc\r\nhashmgr.cxx\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\INCLUDE\\xlocale(336) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc\r\nhunspell.cxx\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\INCLUDE\\xlocale(336) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc\r\nhunzip.cxx\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\INCLUDE\\xlocale(336) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc\r\nphonet.cxx\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\INCLUDE\\xlocale(336) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc\r\nreplist.cxx\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\INCLUDE\\xlocale(336) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc\r\nsuggestmgr.cxx\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\INCLUDE\\xlocale(336) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc\r\nhunspelldll.cxx\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\VC\\INCLUDE\\xlocale(336) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc\r\nSDL.c\r\nSDL_assert.c\r\nSDL_error.c\r\nSDL_hints.c\r\nSDL_log.c\r\nSDL_atomic.c\r\nSDL_spinlock.c\r\nSDL_windows.c\r\nSDL_cpuinfo.c\r\nSDL_clipboardevents.c\r\nSDL_dropevents.c\r\nSDL_events.c\r\nSDL_gesture.c\r\nSDL_keyboard.c\r\nSDL_mouse.c\r\nSDL_quit.c\r\nSDL_touch.c\r\nSDL_windowevents.c\r\nSDL_rwops.c\r\nSDL_sysloadso.c\r\nSDL_power.c\r\nSDL_syspower.c\r\nSDL_getenv.c\r\nSDL_iconv.c\r\nSDL_qsort.c\r\nSDL_stdlib.c\r\nSDL_string.c\r\nSDL_thread.c\r\nSDL_sysmutex.c\r\nSDL_syssem.c\r\nSDL_systhread.c\r\nSDL_systls.c\r\nSDL_timer.c\r\nSDL_systimer.c\r\nSDL_blit.c\r\nSDL_blit_slow.c\r\nSDL_bmp.c\r\nSDL_clipboard.c\r\nSDL_egl.c\r\nSDL_fillrect.c\r\nSDL_pixels.c\r\nSDL_rect.c\r\nSDL_RLEaccel.c\r\nSDL_shape.c\r\nSDL_stretch.c\r\nSDL_surface.c\r\nSDL_video.c\r\nSDL_windowsclipboard.c\r\nSDL_windowsevents.c\r\nSDL_windowsframebuffer.c\r\nSDL_windowskeyboard.c\r\nSDL_windowsmessagebox.c\r\nSDL_windowsmodes.c\r\nSDL_windowsmouse.c\r\nSDL_windowsopengl.c\r\nSDL_windowsopengles.c\r\nSDL_windowsshape.c\r\nSDL_windowsvideo.c\r\nSDL_windowswindow.c\r\nMicrosoft (R) Windows (R) Resource Compiler Version 6.2.9200.16384\r\r\nCopyright (C) Microsoft Corporation. All rights reserved.\r\r\n\r\n Creating library ./bin/win32/qpad.lib and object ./bin/win32/qpad.exp\r\n","m_cell_id":0,"m_completion_time":[2016,2,29,21,35,6,3],"m_has_any_error":1,"m_current_path":"c:/tp/pure/mo"},{"m_language":"Markdown","m_text_in":"# TODO LIST\ngithub page\nrunning a markdown: open as help page?\ndrag-out support\n\tsecondary windows\n\t\trendering works as is\n\t\tregion is mixed up\nmultiple windows of the same file\nfull notebook search\ntranslation\n\tcall UI._ properly... everywhere\nruntime completion\n\tPython / node.js\n\tactually run an interpreter session and dump the \"require\"d objects to a file\n\t\tsecurity concerns...\nmaximizing notebooks\nfunction hint on *existing* calls - which parameter are you changing right now?\nindent\n\tauto detect space / tab indent\nplugin loading\nhelp\n\timage searching\n\tscript error notification\ndragging a window to occupy \"tips\" fully\ncode beautifier\n\thelp code auto beautification\n(test) proper FindClose for abandoned finder callbacks\nnotebook ctrl+m focus\ndiff / undo on reload\nAC plugins\n\ttex ref\n\tbash\n\tjs member name in certain strings\n\t--\n\tmulti-source combination\n\t\tsome candidates may smash a context\n\t\tput this in as a property of the candidates\ntentative focus refresh: infinite loop risk\nctrl+d at EOL\ndblclick at notebook eol\nporting\n\tlinux alt+tab\n\tlinux instance detection\n\t\tint pid_file = open(\"/var/run/whatever.pid\", O_CREAT | O_RDWR, 0666);\n\t\tint rc = flock(pid_file, LOCK_EX | LOCK_NB);\n\t\tif(rc) {\n\t\t if(EWOULDBLOCK == errno)\n\t\t ; // another instance is running\n\t\t}\n\t\telse {\n\t\t // this is the first instance\n\t\t}\n\tunix search path for jc\nmultiple tabs for the same file\n\tprivate sel / scroll\n\tuse circled numbers for id?\nctrl+mousewheel\n\tper-tab scale? make it global\nmouse centric interaction\n\ttoolbar in menu bar\nlocalization, theme\nctrl+g mode\n\tgoto button to trigger it on the tophint\n\tneed must-appear\nshort and simple theme color palette\nput plugins in ~/.qpad\nlinux\n\t\"make install\" package\nmake top hint / notification dodge \n\tMouseOver / cursor\nswap ctrl+shift+v and ctrl+v?\nbinary editor reloading?\nfor() is not a function\nfileindex gc vs parse queue\nmac\n\ttooltip hotkey translation, zoom hotkey\nmac application menu\nrendering\n\ttrue AA for roundrect\ngit diff viewer\nauto-include files\ntex\n\tport more of deferred.qpadscript\n\tenabling/disabling plugins in menu\nCJK PPM:\n\twork in conjunction with IME?\n\t\tcould have blind prediction...\n\tiphone prediction isn't that useful\nwin10 icon\nvery narrow file list...\nbad parser result after multiple saves\n\tcould be diff tracker bug\nbinary editor\n\tduk buffer size limit\nsavable text highlight\n\tlengthed bookmark\n\tuse shift+ctrl+q with sel to toggle\n\trender it in a style resembling \"left-side\" bookmarks\n\t--\n\tis it really needed?\n\tor general annotations\n\t\tbetter done as a git tool\ngeneric HTML rendering?\n\tcheerio - looks managable\n\tneed module conversion: npm to duktape\n\t\thttps://www.npmjs.com/package/node-uglifier\n\tdid it with browserify\n\tit magically works in duktape with a minor modification\n","m_text_out":"","m_cell_id":1,"m_has_any_error":0,"m_completion_time":[2016,1,11,22,42,45,5]},{"m_language":"Markdown","m_text_in":"Search result","m_text_out":"c:/tp/pure/mo/qpad.jc:13384..13389: catch\nc:/tp/pure/mo/res/lib/bin_editor.js:19456..19461: catch\nc:/tp/pure/mo/res/lib/bin_editor.js:31816..31821: catch\nc:/tp/pure/mo/res/lib/bin_editor.js:42590..42595: catch\nc:/tp/pure/mo/res/lib/code_editor.js:88573..88578: catch\nc:/tp/pure/mo/res/lib/code_editor.js:235520..235525: catch\nc:/tp/pure/mo/res/lib/global_doc.js:1386..1391: catch\nc:/tp/pure/mo/res/lib/help_page.js:14278..14283: catch\nc:/tp/pure/mo/res/lib/langdef.js:8808..8813: catch\nc:/tp/pure/mo/res/lib/notebook.js:10743..10748: catch\nc:/tp/pure/mo/res/lib/notebook.js:19206..19211: catch\nc:/tp/pure/mo/res/main.js:1025..1030: catch\nc:/tp/pure/mo/res/main.js:1789..1794: catch\nc:/tp/pure/mo/res/misc/dict/en_us.dic:97903..97908: catch\nc:/tp/pure/mo/res/misc/dict/en_us.dic:97915..97920: catch\nc:/tp/pure/mo/res/misc/dict/en_us.dic:97927..97932: catch\nc:/tp/pure/mo/res/misc/dict/en_us.dic:97941..97946: catch\nc:/tp/pure/mo/res/misc/dict/en_us.dic:97951..97956: catch\nc:/tp/pure/mo/res/misc/dict/en_us.dic:97964..97969: catch\nc:/tp/pure/mo/res/misc/dict/en_us.dic:97977..97982: catch\nc:/tp/pure/mo/res/misc/dict/en_us.dic:97991..97996: catch\nc:/tp/pure/mo/res/misc/dict/en_us.dic:98002..98007: catch\nc:/tp/pure/mo/res/misc/dict/en_us.dic:98015..98020: catch\nc:/tp/pure/mo/res/misc/dict/en_us.dic:145296..145301: catch\nc:/tp/pure/mo/res/misc/dict/en_us.dic:183203..183208: catch\nc:/tp/pure/mo/res/misc/dict/en_us.dic:239596..239601: catch\nc:/tp/pure/mo/res/plugin/edbase.js:3853..3858: catch\nc:/tp/pure/mo/res/plugin/edbase.js:10484..10489: catch\nc:/tp/pure/mo/res/plugin/edbase.js:12441..12446: catch\nc:/tp/pure/mo/res/plugin/edbase.js:13599..13604: catch\nc:/tp/pure/mo/res/plugin/edbase.js:14429..14434: catch\nc:/tp/pure/mo/res/plugin/edbase.js:17040..17045: catch\nc:/tp/pure/mo/res/plugin/edbase.js:20777..20782: catch\nc:/tp/pure/mo/res/plugin/edbase.js:36874..36879: catch\nc:/tp/pure/mo/res/plugin/edbase.js:49917..49922: catch\nc:/tp/pure/mo/res/plugin/edbase.js:61882..61887: catch\n","m_has_any_error":1,"m_cell_id":2},{"m_language":"Windows BAT","m_text_in":"@echo off\nrem build script for 'c:/tp/pure/mo/qpad.jc'\ncd /d c:/tp/pure/mo\njc -brelease -awin64 c:/tp/pure/mo/qpad.jc\ncd bin\\win64_release\ndel qpad3beta_64.7z\n7z a qpad3beta_64.7z qpad.exe\ndel c:\\software\\cmder\\bin\\qpad_old.exe\nren c:\\software\\cmder\\bin\\qpad.exe qpad_old.exe\ncopy qpad.exe c:\\software\\cmder\\bin\\qpad.exe\n","m_text_out":"s7res.c\r\n Creating library c:/tp/pure/mo/bin/win64_release/qpad.lib and object c:/tp/pure/mo/bin/win64_release/qpad.exp\r\n\r\n7-Zip [64] 15.14 : Copyright (c) 1999-2015 Igor Pavlov : 2015-12-31\r\n\r\nScanning the drive:\r\n1 file, 4527104 bytes (4421 KiB)\r\n\r\nCreating archive: qpad3beta_64.7z\r\n\r\nItems to compress: 1\r\n\r\n\r\nFiles read from disk: 1\r\nArchive size: 1604834 bytes (1568 KiB)\r\nEverything is Ok\r\n 1 file(s) copied.\r\n","m_cell_id":3,"m_has_any_error":0,"m_current_path":"c:/tp/pure/mo","m_completion_time":[2016,2,29,21,38,19,3]}]}
1 change: 1 addition & 0 deletions qpad.jc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ __generate_json("icon_file","icon256.png")
__generate_json("icon_win","iconwin.ico")
//__generate_json("include_js","build/make_new_docs.js")
//__generate_json("linux_cc","clang")
__generate_json("linux_cc","gcc-5")
if Platform.IS_WINDOWS:
__generate_json("lib_files","shell32.lib")
__generate_json("lib_files","kernel32.lib")
Expand Down
9 changes: 9 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# QPad Text Editor

*Fast.* A 10MB file won't feel any different than a 10KB file. A 10GB file runs just as fast once it finishes loading.

*Beautiful.* QPad renders text at PDF-reader-like quality with all the fancy effects: antialiasing, gamma correction, sub-pixel placement, high-DPI support.

*Straightforward.* Powerful features can be accessed without writing arcane regexps or learning a scripting language.

For more details, visit the github io page.
17 changes: 17 additions & 0 deletions res/lib/code_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5747,6 +5747,23 @@ W.CodeEditor=function(id,attrs){
var sel_fbar=doc_fbar.GetSelection();
if(!(sel_fbar[1]>sel_fbar[0])){return;}
var ssource_text=doc_fbar.ed.GetText(sel_fbar[0],sel_fbar[1]-sel_fbar[0]);
if((UI.m_ui_metadata["<find_state>"].m_find_flags&UI.SEARCH_FLAG_REGEXP)){
//crude unescape
var in_slash=0;
var unescaped_ret=[];
for(var i=0;i<ssource_text.length;i++){
var ch=ssource_text[i];
if(in_slash){
unescaped_ret.push(ch);
in_slash=0
}else if(ch=='\\'){
in_slash=1;
}else{
unescaped_ret.push(ch);
}
}
ssource_text=unescaped_ret.join("");
}
var starget_text="(.+)";
for(var i=0;i<g_regexp_folding_templates.length;i++){
if(ssource_text.search(g_regexp_folding_templates[i].regexp)>=0){
Expand Down
7 changes: 6 additions & 1 deletion res/lib/global_doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ UI.m_ui_metadata={};
(function(){
var s_json=IO.ReadAll(IO.GetStoragePath()+("/metadata.json"))
if(s_json){
UI.m_ui_metadata=JSON.parse(s_json)
try{
UI.m_ui_metadata=JSON.parse(s_json);
}catch(e){
//ignore invalid json
UI.m_ui_metadata={};
}
}
})();
UI.SaveMetaData=function(){
Expand Down

0 comments on commit 260b38b

Please sign in to comment.