Giter Site home page Giter Site logo

Comments (6)

mickeynp avatar mickeynp commented on June 20, 2024

Hi Jonathan. Yeah you ran into a limit with tempo; I'm working on a replacement for it in Combobulate that'll allow for keyboard quit to unwind properly and to ensure that @ is present either in the prompt or in the output.

from combobulate.

mickeynp avatar mickeynp commented on June 20, 2024

Can you try development branch? It features a rewritten code templating engine. (So do report any issues you find.)

from combobulate.

jonathanmfung avatar jonathanmfung commented on June 20, 2024

Hi Mickey,

I've used the development branch and noticed some issues with the overlays.

Here's step-by-step instructions, with screenshot to show overlays (theme is modus-operandi, if that matters):

# Starting code, 2 function definitions
def foo(x):
    print(x)

def bar(x):
    print(x)

# step 1: Point on beginning of first def
#         combobulate-envelop-python-ts-mode-decorate
#         Input: d e c 1 RET
#         Expected result of adding decorator to def at point
@dec1
def foo(x):
    print(x)

def bar(x):
    print(x)

# step 2: Point on beginning of second def
#         combobulate-envelop-python-ts-mode-decorate
#         Input: C-g
#         Expected result of no changes
@dec1
def foo(x):
    print(x)

def bar(x):
    print(x)

# step 3: Point on beginning of second dif
#         combobulate-envelop-python-ts-mode-decorate
#         Input: d e c 2 Ret
#         Unexpected result of duplicate decorator, with one having overlays
@dec1
def foo(x):
    print(x)

@dec2@dec2
def bar(x):
    print(x)

screenshot

I believe the overlay logic is in combobulate-envelope-expand-instructions, perhaps specifically combobulate-envelope--registers.


Additionally, concerning unwinding with combobulate-envelop-python-ts-mode-nest-if (likewise -while, -for) in a nested context, such that the user is prompted in the echo:
echo.

If I C-g while in this prompt state, the if : is kept in the buffer. I would expect C-g to discard the if : insertion. (undo) is a quick resolution though. I wouldn't classify this as a full bug.

Using combobulate-envelop-python-ts-mode-nest-if in a NON-nested context just inserts if :, with no prompt because you can't change the if : node position. I expect this behavior, and know to (undo) if I want to revert.

from combobulate.

mickeynp avatar mickeynp commented on June 20, 2024

Thanks for the super detailed bug report. I really appreciate it.

Yes it seems that an overlay can escape its confines somehow on keyboard-quit. I've fixed that in development.

I cannot reproduce the C-g issue you list at the end. That should have worked that way already. Can you try if it's reproducible after this push? If it still happens I'll take another look of course.

from combobulate.

jonathanmfung avatar jonathanmfung commented on June 20, 2024

I just pulled 2df1527 on development, it seems like I am no longer encountering the second issue (I was on 31f7e2a before). The decorator overlay issue is also resolved.

Thanks so much for all your work, both in combobulate and the community.

from combobulate.

mickeynp avatar mickeynp commented on June 20, 2024

Thanks for the kind words, Jonathan!

from combobulate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.