Home Download Buy Blog Forum Support

Dev Build 3013

Re: Dev Build 3013

Postby bizoo on Fri Feb 22, 2013 10:49 am

An error in sublime_plugin.py:
Code: Select all
def on_window_command(window_id, name, args):
    window = sublime.Window(window_id)
    for callback in all_callbacks['on_text_command']:
        res = callback.on_window_command(window, name, args)
        if isinstance(res, tuple):
            return res
        elif res:
            return (res, None)
    return ("", None)

on_text_command string must replaced by on_window_command.
bizoo
 
Posts: 886
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Dev Build 3013

Postby whee on Fri Feb 22, 2013 2:59 pm

When I open up the default preference files in Windows, I'm seeing line feed characters (\n, 0x0a) show up as question mark blocks. Doesn't seem to affect anything, but it was fine in 3012. 32-bit Portable Windows build, running XP.
whee
 
Posts: 7
Joined: Mon Oct 10, 2011 2:32 am

Re: Dev Build 3013

Postby SJML on Fri Feb 22, 2013 7:29 pm

It seems like something has changed with the view.edit functionality. What I have is a TextCommand that, when run() is called, passes the edit parameter and its self.view to another function to handle the processing.

In ST2, this function was able to open a new scratch view and insert text to it (using the passed edit object), but now the insert call doesn't seem to do anything. I know there have been some changes to the way edit objects work -- is there a better way to do what I'm trying here?
SJML
 
Posts: 19
Joined: Sat Feb 05, 2011 3:32 am

Re: Dev Build 3013

Postby facelessuser on Fri Feb 22, 2013 8:09 pm

Jon, I have a request that you may or may not be interested in implementing.

Currently there are a number of plugins that load up custom gutter icons. ST3 currently still uses the old way of loading gutter icons; they must be relative to "Theme - Default". In the past, when a plugin was creating a region, you could just feed in the custom icon like so:

Where custom is an icon named custom.png
Code: Select all
../MyPlugin/Icons/custom


With the sublime-package format, this is impossible since the icons are now inside an archive, but regions require the icons to be a path minus the png extension.

Ideally it would be nice to give an icon path not relative to "Theme - Default" if the icons was provided with a path like "Packages/MyPlugin/Icons/custom" (keeping with the current convention used everywhere else). And it would be doubly nice if the API simply did a load_resource() on the path to retrieve the icon so it would work for sublime-package archives as well.

Currently, plugins will have to unpack icon resources themselves and also must create a dummy "Theme - Default" folder to allow the region command to find the icon relative to the "Theme - Default" and not fail.
facelessuser
 
Posts: 1575
Joined: Tue Apr 05, 2011 7:38 pm

Re: Dev Build 3013

Postby whee on Sat Feb 23, 2013 9:30 pm

Another thing I've noticed in 3013: my Find Next/Find Previous actions do the opposite thing I'd expect. I.e., I press the key designated as "Find Next" in the menu...and it goes backwards. Find Previous goes forwards.
whee
 
Posts: 7
Joined: Mon Oct 10, 2011 2:32 am

Re: Dev Build 3013

Postby prmaple on Sat Feb 23, 2013 9:56 pm

whee wrote:Another thing I've noticed in 3013: my Find Next/Find Previous actions do the opposite thing I'd expect. I.e., I press the key designated as "Find Next" in the menu...and it goes backwards. Find Previous goes forwards.

Make sure you didn't accidentally turned "reverse" on
Find me
HTML5 Games: SNAKE! Tetris!
prmaple
 
Posts: 82
Joined: Sun Dec 25, 2011 11:06 am
Location: Melbourne

Re: Dev Build 3013

Postby assassini on Sun Feb 24, 2013 4:17 pm

Thanks for the C++ highlighting fix!
assassini
 
Posts: 4
Joined: Sun Feb 10, 2013 9:24 am

Re: Dev Build 3013

Postby C0D312 on Sun Feb 24, 2013 5:08 pm

Hey Jon, when you get a chance, could you add some sort of banner or notice to the ST1 pages to let people know that it's out of date and then link them to either to ST2 or ST3 docs? I've noticed people occasionally finding http://www.sublimetext.com/docs/commands and http://www.sublimetext.com/docs/key-bindings and then being confused when the information is irrelative.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: Dev Build 3013

Postby jjgod on Mon Feb 25, 2013 10:30 am

I have to force quit every time with this build, the whole program is hanging, after launching it for a few minutes.

Code: Select all
Date/Time:       2013-02-25 11:04:57 +0100
OS Version:      10.8.2 (Build 12C3012)
Architecture:    x86_64
Report Version:  11

Command:         Sublime Text
Path:            /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
Version:         Build 3013 (3013)
Parent:          launchd [143]

PID:             19496
Event:           hang
Duration:        0.99s
Steps:           10 (100ms sampling interval)

Hardware model:  MacBookPro10,1
Active cpus:     8
Free pages:      349385 pages (-2515)
Pageins:         0 pages
Pageouts:        0 pages


Process:         Sublime Text [19496]
Path:            /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
Architecture:    x86_64
Parent:          launchd [143]
UID:             501
Task size:       25910 pages

  Thread 0x39e234   DispatchQueue 1          priority 46       
  10 start + 52 (Sublime Text) [0x10d9a01a4]
    10 main + 2924 (Sublime Text) [0x10d9a0f7e]
      10 -[NSApplication run] + 517 (AppKit) [0x7fff91327283]
        10 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128 (AppKit) [0x7fff9132fed2]
          10 _DPSNextEvent + 685 (AppKit) [0x7fff91330613]
            10 BlockUntilNextEventMatchingListInMode + 62 (HIToolbox) [0x7fff9077ecd3]
              10 ReceiveNextEventCommon + 356 (HIToolbox) [0x7fff9077ee42]
                10 RunCurrentEventLoopInMode + 209 (HIToolbox) [0x7fff9077f0a4]
                  10 CFRunLoopRunSpecific + 290 (CoreFoundation) [0x7fff93a386b2]
                    10 __CFRunLoopRun + 1513 (CoreFoundation) [0x7fff93a39099]
                      10 __CFRunLoopDoTimer + 557 (CoreFoundation) [0x7fff93a538bd]
                        10 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20 (CoreFoundation) [0x7fff93a53da4]
                          10 __NSFireTimer + 96 (Foundation) [0x7fff929c5513]
                            10 ns_work_queue_runner::run_items() + 189 (Sublime Text) [0x10db73ab3]
                              10 ??? (Sublime Text + 413806) [0x10da0306e]
                                10 int send_helper<int>::send_message<33u, object_id>(object_id const&) + 253 (Sublime Text) [0x10da06187]
                                  10 void wait_for_reply<int>(reply_entry*, int*) + 57 (Sublime Text) [0x10da14ab9]
                                    10 shm_read(shm_channel*, string_buffer*, int) + 68 (Sublime Text) [0x10db90556]
                                      10 ??? (Sublime Text + 2041373) [0x10db9061d]
                                        10 ??? (Sublime Text + 2041577) [0x10db906e9]
                                          10 __psynch_cvwait + 10 (libsystem_kernel.dylib) [0x7fff8e7380fa]
                                           *10 psynch_cvcontinue + 0 (mach_kernel) [0xffffff80005b4b10]

  Thread 0x39e240   DispatchQueue 2          priority 48       
  10 _dispatch_mgr_thread + 54 (libdispatch.dylib) [0x7fff920959ee]
    10 kevent + 10 (libsystem_kernel.dylib) [0x7fff8e738d16]
     *10 ??? (mach_kernel + 3467616) [0xffffff800054e960]

  Thread 0x39e248   priority 46       
  10 thread_start + 13 (libsystem_c.dylib) [0x7fff8c205181]
    10 _pthread_start + 327 (libsystem_c.dylib) [0x7fff8c218742]
      10 ??? (Sublime Text + 2061364) [0x10db95434]
        10 basic_queue_runner::run() + 76 (Sublime Text) [0x10db9527a]
          10 __psynch_cvwait + 10 (libsystem_kernel.dylib) [0x7fff8e7380fa]
           *10 psynch_cvcontinue + 0 (mach_kernel) [0xffffff80005b4b10]

  Thread 0x39e249   priority 46       
  10 thread_start + 13 (libsystem_c.dylib) [0x7fff8c205181]
    10 _pthread_start + 327 (libsystem_c.dylib) [0x7fff8c218742]
      10 ??? (Sublime Text + 2069849) [0x10db97559]
        10 io_worker::thread_proc() + 45 (Sublime Text) [0x10db976d3]
          10 io_scheduler::extract_next_request() + 96 (Sublime Text) [0x10db97114]
            10 __psynch_cvwait + 10 (libsystem_kernel.dylib) [0x7fff8e7380fa]
             *10 psynch_cvcontinue + 0 (mach_kernel) [0xffffff80005b4b10]

  Thread 0x39e24a   priority 46       
  10 thread_start + 13 (libsystem_c.dylib) [0x7fff8c205181]
    10 _pthread_start + 327 (libsystem_c.dylib) [0x7fff8c218742]
      10 ??? (Sublime Text + 2069849) [0x10db97559]
        10 io_worker::thread_proc() + 45 (Sublime Text) [0x10db976d3]
          10 io_scheduler::extract_next_request() + 96 (Sublime Text) [0x10db97114]
            10 __psynch_cvwait + 10 (libsystem_kernel.dylib) [0x7fff8e7380fa]
             *10 psynch_cvcontinue + 0 (mach_kernel) [0xffffff80005b4b10]

  Thread 0x39e269   priority 46       
  10 thread_start + 13 (libsystem_c.dylib) [0x7fff8c205181]
    10 _pthread_start + 327 (libsystem_c.dylib) [0x7fff8c218742]
      10 shm_reader_thread(void*) + 113 (Sublime Text) [0x10d9f805b]
        10 shm_read(shm_channel*, string_buffer*, int) + 68 (Sublime Text) [0x10db90556]
          10 ??? (Sublime Text + 2041373) [0x10db9061d]
            10 ??? (Sublime Text + 2041577) [0x10db906e9]
              10 __psynch_cvwait + 10 (libsystem_kernel.dylib) [0x7fff8e7380fa]
               *10 psynch_cvcontinue + 0 (mach_kernel) [0xffffff80005b4b10]

  Thread 0x39e278   priority 46       
  10 thread_start + 13 (libsystem_c.dylib) [0x7fff8c205181]
    10 _pthread_start + 327 (libsystem_c.dylib) [0x7fff8c218742]
      10 ??? (Sublime Text + 2800554) [0x10dc49baa]
        10 __psynch_cvwait + 10 (libsystem_kernel.dylib) [0x7fff8e7380fa]
         *10 psynch_cvcontinue + 0 (mach_kernel) [0xffffff80005b4b10]

  Thread 0x39e2b6   priority 62       
  10 thread_start + 13 (libsystem_c.dylib) [0x7fff8c205181]
    10 _pthread_start + 327 (libsystem_c.dylib) [0x7fff8c218742]
      10 __NSThread__main__ + 1345 (Foundation) [0x7fff929e7612]
        10 +[NSURLConnection(Loader) _resourceLoadLoop:] + 356 (Foundation) [0x7fff92989586]
          10 CFRunLoopRunSpecific + 290 (CoreFoundation) [0x7fff93a386b2]
            10 __CFRunLoopRun + 1078 (CoreFoundation) [0x7fff93a38ee6]
              10 __CFRunLoopServiceMachPort + 195 (CoreFoundation) [0x7fff93a33803]
                10 mach_msg_trap + 10 (libsystem_kernel.dylib) [0x7fff8e736686]
                 *10 ipc_mqueue_receive_continue + 0 (mach_kernel) [0xffffff8000213030]

  Thread 0x39e2c5   priority 46       
  10 thread_start + 13 (libsystem_c.dylib) [0x7fff8c205181]
    10 _pthread_start + 327 (libsystem_c.dylib) [0x7fff8c218742]
      10 __select + 10 (libsystem_kernel.dylib) [0x7fff8e738322]
       *10 ??? (mach_kernel + 3576576) [0xffffff8000569300]

  Binary Images:
         0x10d99e000 -        0x10de4fff7  com.sublimetext.3 Build 3013 (3013) <753F7ABA-785E-380A-98E4-0B848A69AADB> /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
      0x7fff8c204000 -     0x7fff8c2d0fe7  libsystem_c.dylib <8CBCF9B9-EBB7-365E-A3FF-2F3850763C6B> /usr/lib/system/libsystem_c.dylib
      0x7fff8e726000 -     0x7fff8e741ff7  libsystem_kernel.dylib <EC0A9F5B-C9F5-336B-A7DD-49A718042F39> /usr/lib/system/libsystem_kernel.dylib
      0x7fff9071f000 -     0x7fff90a4fff7  com.apple.HIToolbox 2.0 <317F75F7-4B0F-35F5-89A7-F20BA60AC944> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
      0x7fff911db000 -     0x7fff91e08ff7  com.apple.AppKit 6.8 (1187.34) <1FF64844-EB62-3F96-AED7-6525B7CCEC23> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
      0x7fff92091000 -     0x7fff920a6ff7  libdispatch.dylib <D26996BF-FC57-39EB-8829-F63585561E09> /usr/lib/system/libdispatch.dylib
      0x7fff92952000 -     0x7fff92caefff  com.apple.Foundation 6.8 (945.11) <A5D41956-A354-3ACC-9355-BE200072223B> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
      0x7fff93a04000 -     0x7fff93bedfff  com.apple.CoreFoundation 6.8 (744.12) <EF002794-DAEF-31C6-866C-E3E3AC387A9F> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
*0xffffff8000200000 - 0xffffff8000734d7c  mach_kernel <0AFA55FD-872F-3BBE-8630-214EB586A16D> /mach_kernel
jjgod
 
Posts: 1
Joined: Sun Dec 16, 2012 9:25 pm

Re: Dev Build 3013

Postby FichteFoll on Mon Feb 25, 2013 10:41 am

Since you pointed to the API docs I thought I'd let you know about undocumented features in the docs and other things:

Firstly, `view.begin_edit()` (and end_edit) have been changed drastically and require an `edit_token` which can only be obtained within a command callback. This information is not given in the ST3 docs since it still states that Edit objects can manually be created in the "Class sublime.Edit" section.
Then, looking at the source of sublime_plugin there seems to be an `edit_token` passed in any command. How do these behave in Application or Window Commands? Are they even implemented or just some internal simplification for calling commands with the same number of parameters?

Finally, I once created a list with undocumented API features from ST2 which are still missing for ST3: https://github.com/SublimeText/UnofficialDocs/issues/15
You should certainly add `is_checked` and `on_query_completions`, `find_open_file` and `log_result_regex` (only ST2 docs). The other things are rather hacky and are not needed in the docs.
FichteFoll
 
Posts: 401
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 22 guests