I am trying to select buffers and I am facing a number of problems.
- I want to append certain text and then get it’s buffer. However when I use the following code I get the buffer range from the point where I append the text upto the end of editor window. How do I restrict the buffer to only include the text?
buffer = editor.buffer; range = buffer.append("string");
- I want to clear all the text in a file using buffer API Link. How do I select the starting point and ending point of the entire text file?