Giter VIP home page Giter VIP logo

Comments (3)

sebastianst avatar sebastianst commented on July 23, 2024 1

Ok there's more ;)

  • It would be nice to set a (optional) different smart-diff for shrinking. I would rather set growing to ~8, but shrinking only to 1 or 2. I can implement that and send a PR.
  • Detect growth by words and lines. Diffs are nice for growth/shrinkage of code or mouse selection, but when I am writing text, I often select by hitting Ctrl+Shift+ ←...← (or →...→), and then the primary selection grows by words, which are not detected if the diff is shorter than a word. So the logic would be: Smart-update (i.e., pop last) if growing/shrinking by 1 word or line (or even a configurable amount of words/lines, since it wouldn't make a big difference implementation-wise). I can send a PR for that as well. (Open question: What separates words? Spaces or \s or \W or a custom list of chars?)

Thoughts? I should put that into a new Issue as an enhancement.

from clipster.

mrichar1 avatar mrichar1 commented on July 23, 2024

Thanks for spotting this!

I've replaced startswith with in and skipped the smart_update logic if the strings are identical (as the duplicates code handles this). Also added some tests: 9cdeeff

Let me know if this fixes the issue for you - the update_history method could probably do with some refactoring to make it tidier and more pythonic, but it should be working fine.

from clipster.

sebastianst avatar sebastianst commented on July 23, 2024

Works as expected, thank you!

from clipster.

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.