Code Monkey home page Code Monkey logo

Comments (4)

szatanjl avatar szatanjl commented on August 20, 2024 1

I see. Thank you for comprehensive answer.

from st.

juliusHuelsmann avatar juliusHuelsmann commented on August 20, 2024

Hi!

Problem description
The problem I list as bug basically breaks down to the fact, that moving through history when a program currently writes output into the terminal is not possible; it overrides the wrong position in the terminal. You can observe this behavior for instance, if you

ping www.google.de

, then enter Normal mode, and try to move through the history while this command executes.

Cause of the problem
This is caused by the fact, that the scrollback patch only models one current position, which is used to insert 'new content' (like the output of a program which is currently running). In order to move through the history while a program is running, it is necessary to have two distinct positions (one which indicates the currently inspected position in the history, and a second one which is used to insert new content). In order to 'fix' this issue, and to solve a few other ones (keep content in lines after resizing, variable length lines ...) I started implementing my own history patch as a replacement of the scrollback patch, which I planned to use in vim-browse.

So I use the word 'bug' only in the sense of 'behavior which I would like to change', not in the sense of a really harmful bug, like segfaults.

Timeline

Do you have an idea on when the dependency on scrollback patch will be removed and those bugs fixed?

I started writing my own "history" patch in order to replace the scrollback patch, but did not finish writing it (and won't do so in the foreseeable future due to lack of time). One issue with my current attempt to writing a scrollback patch replacement is, that I try to fix multiple problems at once, and therefore change a lot of the original st code, which might make it more difficult to apply the patch if other patches are already applied.

Current work on this issue

I can see a lot of branches. Is one of them the "work in progress" of vim-browse not based on scrollback?

Not exactly, the only two active patch branches are the plainVimPatchV1 and the plainAlphaPatchV1, the other branches are either feature requests which are too custom to make it into one of the patches, or branches for porting the two patches to a more recent version of st. However, I started writing the scrollback patch replacement on the branch historyPatch some time ago, but I did not finish it.

Current state of the history patch
I don't think this branch is of much use, as the current version I highlight the repainted areas in different colors in order to debug edge cases and improve repainting, and if I remember correctly there is at least an issue with ALT screen applications. The branch is by no means stable, but the core issue is fixed, you can repeat the ping experiment from above, and it does not screw up the output. Note however, that the vim patch is not applied, this patch has simple "move through history' features just for testing purpose.

I planned to implement the vim patch which is not based on the scrollback patch plainVimPatchV2, or separate the implementation of the vim patch from the history patch in uses underneath. The sole point of interaction is the API to get the current position, which can be kept similar for both solutions, s.th. it stays possible to maintain the vim patch with both underlying history patches.

The status of the implementation is tracked in the issue #6.

from st.

juliusHuelsmann avatar juliusHuelsmann commented on August 20, 2024

I released the history-patch and thus removed the scrollback-patch dependency in the new version of the vim patch. The updated patch is available here or can be extracted from the history-patch dev repo.

from st.

szatanjl avatar szatanjl commented on August 20, 2024

Awesome. I will take a look at it once I find some time. Thank you.

from st.

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.