Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content of the input part in telega-chat-mode is lost when executing telega-chatbuf-edit-prev #336

Open
rodrigomorales1 opened this issue Dec 18, 2021 · 0 comments

Comments

@rodrigomorales1
Copy link

rodrigomorales1 commented Dec 18, 2021

Telega Setup

Emacs:

ELISP> (emacs-version)
"GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.17.4)
 of 2021-03-26"

Telega

ELISP> (telega-version)
"telega v0.7.100 (TDLib v1.7.10) (telega-server v0.7.13)"

Current Behavior

The content of the input part is in a buffer whose major mode is telega-chat-mode is lost when executing telega-chatbuf-edit-prev (M-p). I think this is undesired behavior because suppose I write a long message and I accidentally execute telega-chatbuf-edit-prev (M-p), my message would be lost.

Steps to Reproduce

  1. Send a message in a buffer whose major mode is telega-chat-mode
  2. Now, write a new message but don't send it
  3. Execute telega-chatbuf-edit-prev (M-p)

At this point, the message that you initially typed has been lost. If you execute undo (C-/), the message will not be recovered.

Possible Solution

A possible solution would be that the content of the input box is stored somewhere before it gets deleted. Once the edit is cancelled, the message that was previously there is shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants