Skip to content

Problem with argument and subindexing queries In decorators when The beginning of the line Or all of it is selected #30

Closed
@mpourmpoulis

Description

@mpourmpoulis

Description

Okay this is quite a critical bug, it prevents picking up arguments from function calls inside decorators When the cursor is at the beginning of the line or the entire line you selected. Unfortunately, due to the way the above/below/up/down Is implemented it is also affected And I should not have missed this… Dedicated sub indexing queries are also affected, but big ROI aren't!

bug11

It should not be confused with #17 , Because what is actually going on here Is that the origin node becomes ast.ClassDef instead of the decorator.

General Information

Plug-In Version:

Queries Affected

  • Argument

  • Big Roi

  • Sub Indexing

    • only dedicated Subindexing commands
    • also affect suffixes
  • Operations

    • Paste
    • Delete
    • Swap
    • Edit
    • Prefix
  • Collections

Response To Command

  • the command fails/nothing happens at all

  • the command select/operates on a wrong result,

    • that did not match your positional description (e.g. grabs an ROI one line above or below the one you wanted)
    • did not match the type of result you are looking for(e.g. you wanted an assertion message but you got assertion condition)
    • or maybe the result was of the correct type and position but it was selected improperly(e.g. you asked for the parameter list of function but the last parameter was not selected)
    • or maybe things are working fine when trying to select a region as a whole but start breaking when you try access smaller pieces of it
    • or perhaps the command did find the correct result but perhaps the alternatives included regions they should not or vice versa. (for instance because the command searched the entire code instead of just the current function or vice versa)
  • somehow the whole preserving the current state(alternatives,origin,initial_origin and so on) was messed up by the command! For instance,

    • track was lost of initial originand things were pasted back onto the wrong position
    • alternatives were changed when they were supposed not to!(for instance prefix operations are not supposed to do this)
  • the command seems to select/operates on a random result

  • the command has some other unintended behavior

Context In Which It Appears

Does the problem seem to appear or disappear only some of the time? Does there seem to be

  • spatial context/correlation with the cursor? for instance

    • is it affected by adjustments to the cursor position?()
    • does it make a difference whether you have selected some text or not?
    • does the problem appear only when you're going in one direction?
    • does it have to only do with multiple cursors?
    • or perhaps when switching back-and-forth between single and multiple cursors?
  • a temporal context?

    • does it appear only right after selection query was executed?
    • does it appear only if no one other selection query was executed since the last edit?
    • does it appear only after executing an operation(paste,delete,swap)?
    • does it appear when you perform manual editing between commands?
  • correlation with a pattern in the code? Such a pattern might be structural, sometimes lexical,in some cases even some piece of incomplete code that was not handled properly. A strong indicator for such a case when introducing small changes to the code has things from working perfectly into breaking. In case you have identified(or you have any suspicion about) this pattern(or maybe patterns), does the error occure when it appears

    • on the target of the query? (For instance there was a bug at some point that sometimes prevented you from selecting arguments from function calls inside with statements)
    • on the origin of the query?
    • in between them perhaps?
    • somewhere inside to the current function/class/indentation block/...
    • anywhere in the code :)

Error Message

  • error message appears in a pop-up

  • an exception trace back is printed in the sublime console(Ctrl + `)

  • the command fails silently

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions